Versions in this module Expand all Collapse all v0 v0.1.0 Dec 5, 2026 Changes in this version + const AskTokenHeader + const ProblemAAAAElsewhere + const ProblemAMismatch + const ProblemCNAMEMismatch + const ProblemDNSError + const ProblemHTTPProbeFailed + const ProblemNoAddress + const ProblemTXTMissing + const WellKnownPrefix + var ErrInvalidHost = errors.New("domains: invalid host") + var ErrInvalidState = errors.New("domains: invalid state transition") + var ErrNotFound = errors.New("domains: not found") + func AskHandler(r *Resolver, opts ...AskOption) http.Handler + func GenerateToken() (string, error) + func IsUnderZone(host, zone string) bool + func Normalize(input string) (host string, apex bool, err error) + func WellKnownHandler(r *Resolver) http.Handler + type AskOption func(*ask) + func WithAllowHost(fn func(host string) bool) AskOption + func WithAskPeers(cidrs ...string) AskOption + func WithAskToken(token string) AskOption + func WithInsecureNoGuard() AskOption + type Checker interface + ProbeHTTPS func(ctx context.Context, host string) error + Verify func(ctx context.Context, d Domain) Result + type Domain struct + Apex bool + CheckedAt time.Time + CreatedAt time.Time + DegradedAt time.Time + Failures int + Host string + LastProblem string + State State + TenantID string + Token string + VerifiedAt time.Time + func FromContext(ctx context.Context) (Domain, bool) + func (d Domain) Issuable() bool + func (d Domain) Serving() bool + type Lifecycle struct + DegradedGrace time.Duration + FailureThreshold int + PendingExpiry time.Duration + func (l Lifecycle) Advance(ctx context.Context, c Checker, d Domain, now time.Time) (Outcome, error) + func (l Lifecycle) Claimed(d Domain, r Result, now time.Time) (Outcome, error) + func (l Lifecycle) HTTPSReady(d Domain, probeErr error, now time.Time) (Outcome, error) + func (l Lifecycle) Rechecked(d Domain, r Result, now time.Time) (Outcome, error) + type MiddlewareOption func(*middleware) + func WithNotFound(h http.Handler) MiddlewareOption + type Outcome struct + Changed bool + Domain Domain + Expired bool + type Problem struct + Code string + Detail string + type Resolver struct + func NewResolver(s Store, opts ...ResolverOption) *Resolver + func (r *Resolver) Invalidate(host string) + func (r *Resolver) Middleware(opts ...MiddlewareOption) func(http.Handler) http.Handler + func (r *Resolver) Resolve(ctx context.Context, host string) (Domain, error) + type ResolverOption func(*Resolver) + func WithClock(now func() time.Time) ResolverOption + func WithMaxEntries(pos, neg int) ResolverOption + func WithNegativeTTL(d time.Duration) ResolverOption + func WithPositiveTTL(d time.Duration) ResolverOption + type Result struct + Owned bool + Problems []Problem + Routed bool + type State string + const StateActive + const StateDegraded + const StatePendingDNS + const StateSuspended + const StateVerified + type Store interface + Lookup func(ctx context.Context, host string) (Domain, error) + func DevAlwaysVerified(s Store) Store + type Verifier struct + HTTPProbe *http.Client + IPv4 []netip.Addr + IPv6 []netip.Addr + Resolver *net.Resolver + TXTLabel string + Target string + func (v *Verifier) ProbeHTTPS(ctx context.Context, host string) error + func (v *Verifier) Verify(ctx context.Context, d Domain) Result + type Writer interface + Save func(ctx context.Context, d Domain) error