Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamicCertificate ¶
type DynamicCertificate struct {
// contains filtered or unexported fields
}
DynamicCertificate implements tls.Config.GetCertificate. It returns a TLS certificate and refreshes if needed.
func New ¶
func New(certFile, keyFile string, opts ...Option) (*DynamicCertificate, error)
New returns a new instance of DynamicCertificate.
func (*DynamicCertificate) GetCertificate ¶
func (dc *DynamicCertificate) GetCertificate(_ *tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificate returns the current loaded certificate.
type Option ¶
type Option func(*DynamicCertificate)
Option can be used to configure DynamicCertificate.
func WithLogger ¶
WithLogger sets the logger for DynamicCertificate.
func WithRefreshInterval ¶
WithRefreshInterval sets the interval that will be used to periodically check if the TLS certificate should be refreshed.
Click to show internal directories.
Click to hide internal directories.