server: Clarify GetCertificate documentation
This commit is contained in:
parent
69674fcdd5
commit
64dbb3eecb
@ -35,8 +35,11 @@ type Server struct {
|
|||||||
// A WriteTimeout of zero means no timeout.
|
// A WriteTimeout of zero means no timeout.
|
||||||
WriteTimeout time.Duration
|
WriteTimeout time.Duration
|
||||||
|
|
||||||
// GetCertificate, if not nil, will be called to retrieve a new certificate
|
// GetCertificate returns a TLS certificate based on the given
|
||||||
// if the current one is expired or missing.
|
// hostname.
|
||||||
|
//
|
||||||
|
// If GetCertificate is nil or returns nil, then no certificate
|
||||||
|
// will be used and the connection will be aborted.
|
||||||
GetCertificate func(hostname string) (*tls.Certificate, error)
|
GetCertificate func(hostname string) (*tls.Certificate, error)
|
||||||
|
|
||||||
// ErrorLog specifies an optional logger for errors accepting connections,
|
// ErrorLog specifies an optional logger for errors accepting connections,
|
||||||
|
Loading…
Reference in New Issue
Block a user