File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,25 @@ import (
11
11
// It provides options to enable TLS, specify certificate and key files,
12
12
// CA certificate, and whether to skip verification of the server's certificate chain and host name.
13
13
// Use the [TLS.MakeConfig] method to assemble a [*tls.Config] from the TLS struct.
14
+ //
15
+ // Example usage:
16
+ //
17
+ // func main() {
18
+ // tlsConfig := &config.TLS{
19
+ // Enable: true,
20
+ // Cert: "path/to/cert.pem",
21
+ // Key: "path/to/key.pem",
22
+ // Ca: "path/to/ca.pem",
23
+ // Insecure: false,
24
+ // }
25
+ //
26
+ // cfg, err := tlsConfig.MakeConfig("example.com")
27
+ // if err != nil {
28
+ // log.Fatalf("error creating TLS config: %v", err)
29
+ // }
30
+ //
31
+ // // ...
32
+ // }
14
33
type TLS struct {
15
34
// Enable indicates whether TLS is enabled.
16
35
Enable bool `yaml:"tls"`
You can’t perform that action at this time.
0 commit comments