Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateConfig ¶
CertificateConfig the config the user passes to the certificate manager
type CertificateData ¶
CertificateData the result of the generated certificate
type CertificateManager ¶
type CertificateManager struct {
// contains filtered or unexported fields
}
CertificateManager manages certificate generation
func NewCertificateManager ¶
func NewCertificateManager(config CertificateConfig) *CertificateManager
NewCertificateManager creates a new certificate manager with the given config
func (*CertificateManager) EnsureCertificate ¶
func (c *CertificateManager) EnsureCertificate() (CertificateData, error)
EnsureCertificate checks the current certificate's expiry, and generates
a new one if no cert is found or its expiry date is less than 30 day from now. And returns the certificate data.
func (CertificateManager) ListenForChallenges ¶
func (c CertificateManager) ListenForChallenges() error
ListenForChallenges handles http cert verification requests and redirects
all other requests to https
type KeypairReloader ¶
type KeypairReloader struct {
// contains filtered or unexported fields
}
KeypairReloader to use with TLS servers for dynamic reloading
func NewKeypairReloader ¶
func NewKeypairReloader(certManager *CertificateManager) (*KeypairReloader, error)
NewKeypairReloader creates a new instance given the manager to create certs
func (*KeypairReloader) GetCertificateFunc ¶
func (kpr *KeypairReloader) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificateFunc returns a function that returns the up-to-date certificate
Click to show internal directories.
Click to hide internal directories.