certmanager

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRenewTooSoon = errors.New("certificate not yet due for renewal")

ErrRenewTooSoon is returned when a renewal is requested for a certificate that is not yet due for renewal It guards the manual renewal endpoint against wasting Let's Encrypt rate limits on redundant requests

Functions

This section is empty.

Types

type CertManager

type CertManager interface {
	ObtainCertificate(ctx context.Context, domain string) (cert *storage.Certificate, cached bool, err error)
	RenewCertificate(ctx context.Context, domain string) (*storage.Certificate, error)
	RenewExpiringCertificates(ctx context.Context) error
}

CertManager handles certificate acquisition and renewal

func NewCertManager

func NewCertManager(store *storage.Storage, appMetrics *metrics.AppMetrics) (CertManager, error)

NewCertManager creates a new certificate manager

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

Scheduler handles periodic certificate renewal checks

func NewScheduler

func NewScheduler(manager CertManager, checkInterval time.Duration) *Scheduler

NewScheduler creates a new renewal scheduler

func (*Scheduler) Run

func (s *Scheduler) Run(ctx context.Context) error

Run the periodic renewal checks

type User

type User struct {
	Email        string
	Registration *acme.ExtendedAccount
	// contains filtered or unexported fields
}

User implements the lego registration.User interface

func (*User) GetEmail

func (u *User) GetEmail() string

func (*User) GetPrivateKey

func (u *User) GetPrivateKey() crypto.Signer

func (*User) GetRegistration

func (u *User) GetRegistration() *acme.ExtendedAccount

Jump to

Keyboard shortcuts

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