Documentation ¶
Overview ¶
Package certloader contains a certicate loader.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertLoader ¶
type CertLoader struct {
// contains filtered or unexported fields
}
CertLoader is a certificate loader. It watches for changes to the certificate and key files.
func New ¶
func New(certPath, keyPath string, log logger.Writer) (*CertLoader, error)
New allocates a CertLoader.
func (*CertLoader) Close ¶
func (cl *CertLoader) Close()
Close closes a CertLoader and releases any underlying resources.
func (*CertLoader) GetCertificate ¶
func (cl *CertLoader) GetCertificate() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificate returns a function that returns the certificate for use in a tls.Config.
Click to show internal directories.
Click to hide internal directories.