acme

package
v0.65.2 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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