Documentation
¶
Overview ¶
Package tls provides shared TLS configuration for consumoor sinks and sources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDisabled = errors.New("tls: not enabled")
ErrDisabled is returned by Build when TLS is not enabled.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Enabled enables TLS for the connection.
Enabled bool `yaml:"enabled"`
// CAFile is the path to a PEM-encoded CA certificate file used to
// verify the server's certificate.
CAFile string `yaml:"caFile"`
// CertFile is the path to a PEM-encoded client certificate file for
// mutual TLS authentication.
CertFile string `yaml:"certFile"`
// KeyFile is the path to a PEM-encoded client private key file for
// mutual TLS authentication.
KeyFile string `yaml:"keyFile"`
// InsecureSkipVerify disables server certificate verification.
InsecureSkipVerify bool `yaml:"insecureSkipVerify"`
}
Config configures TLS for a connection. When Enabled is true with no other fields, it behaves the same as the previous bare tls: true setting.
Click to show internal directories.
Click to hide internal directories.