acme

package
v0.65.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: BSD-3-Clause, AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

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

type Manager struct {
	*autocert.Manager
	// contains filtered or unexported fields
}

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) AddDomain

func (mgr *Manager) AddDomain(d domain.Domain, accountID, serviceID string)

AddDomain registers a domain for ACME certificate prefetching.

func (*Manager) FailedDomains

func (mgr *Manager) FailedDomains() map[string]string

FailedDomains returns domain names that failed certificate prefetch, mapped to their error.

func (*Manager) PendingCerts

func (mgr *Manager) PendingCerts() int

PendingCerts returns the number of certificates currently being prefetched.

func (*Manager) PendingDomains

func (mgr *Manager) PendingDomains() []string

PendingDomains returns the domain names currently being prefetched.

func (*Manager) ReadyDomains

func (mgr *Manager) ReadyDomains() []string

ReadyDomains returns domain names that have successfully obtained certificates.

func (*Manager) RemoveDomain

func (mgr *Manager) RemoveDomain(d domain.Domain)

RemoveDomain removes a domain from tracking.

func (*Manager) TotalDomains

func (mgr *Manager) TotalDomains() int

TotalDomains returns the total number of registered domains.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL