tlsutil: document Configurator and some of its fields
This commit is contained in:
parent
96a1335874
commit
106384a835
|
@ -168,16 +168,20 @@ type manual struct {
|
|||
cert *tls.Certificate
|
||||
}
|
||||
|
||||
// Configurator holds a Config and is responsible for generating all the
|
||||
// *tls.Config necessary for Consul. Except the one in the api package.
|
||||
// Configurator provides tls.Config and net.Dial wrappers to enable TLS for
|
||||
// clients and servers, for both HTTPS and RPC requests.
|
||||
// Configurator receives an initial TLS configuration from agent configuration,
|
||||
// and receives updates from config reloads, auto-encrypt, and auto-config.
|
||||
type Configurator struct {
|
||||
// lock synchronizes access to all fields on this struct except for logger and version.
|
||||
lock sync.RWMutex
|
||||
base *Config
|
||||
autoTLS autoTLS
|
||||
manual *manual
|
||||
peerDatacenterUseTLS map[string]bool
|
||||
caPool *x509.CertPool
|
||||
// peerDatacenterUseTLS is a map of DC name to a bool indicating if the DC
|
||||
// uses TLS for RPC requests.
|
||||
peerDatacenterUseTLS map[string]bool
|
||||
|
||||
// logger is not protected by a lock. It must never be changed after
|
||||
// Configurator is created.
|
||||
|
|
Loading…
Reference in New Issue