Documentation
¶
Index ¶
- type CertLockMethod
- type Manager
- func (mgr *Manager) AddDomain(d domain.Domain, accountID, serviceID string)
- func (mgr *Manager) FailedDomains() map[string]string
- func (mgr *Manager) PendingCerts() int
- func (mgr *Manager) PendingDomains() []string
- func (mgr *Manager) ReadyDomains() []string
- func (mgr *Manager) RemoveDomain(d domain.Domain)
- func (mgr *Manager) TotalDomains() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertLockMethod ¶
type CertLockMethod string
CertLockMethod controls how ACME certificate locks are coordinated.
const ( // CertLockAuto detects the environment and selects k8s-lease if running // in a Kubernetes pod, otherwise flock. CertLockAuto CertLockMethod = "auto" // CertLockFlock uses advisory file locks via flock(2). CertLockFlock CertLockMethod = "flock" // CertLockK8sLease uses Kubernetes coordination Leases. CertLockK8sLease CertLockMethod = "k8s-lease" )
type Manager ¶
Manager wraps autocert.Manager with domain tracking and cross-replica coordination via a pluggable locking strategy. The locker prevents duplicate ACME requests when multiple replicas share a certificate cache.
func NewManager ¶
func NewManager(certDir, acmeURL string, notifier certificateNotifier, logger *log.Logger, lockMethod CertLockMethod) *Manager
NewManager creates a new ACME certificate manager. The certDir is used for caching certificates. The lockMethod controls cross-replica coordination strategy (see CertLockMethod constants).
func (*Manager) FailedDomains ¶
FailedDomains returns domain names that failed certificate prefetch, mapped to their error.
func (*Manager) PendingCerts ¶
PendingCerts returns the number of certificates currently being prefetched.
func (*Manager) PendingDomains ¶
PendingDomains returns the domain names currently being prefetched.
func (*Manager) ReadyDomains ¶
ReadyDomains returns domain names that have successfully obtained certificates.
func (*Manager) RemoveDomain ¶
RemoveDomain removes a domain from tracking.
func (*Manager) TotalDomains ¶
TotalDomains returns the total number of registered domains.