Documentation
¶
Overview ¶
Package tlsowner decides which component terminates TLS for a hostname, so every surface reports one coherent certificate and ACME state.
Index ¶
- type Inputs
- type Owner
- type ProxyCert
- type RouteReader
- type SettingsReader
- type Snapshot
- func (s Snapshot) Owner(domain string) Owner
- func (s Snapshot) ProxyCert(domain string) (ProxyCert, bool)
- func (s Snapshot) ProxyHosts() []string
- func (s Snapshot) ProxyManaged(domain string) bool
- func (s Snapshot) Route(domain string) (store.ProxyRouteStatus, bool)
- func (s Snapshot) Suppressed(domain string) bool
- func (s Snapshot) Upstream() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inputs ¶
type Inputs struct {
Upstream bool
ACMEEnabled bool
Custom bool
Route *store.ProxyRouteStatus
}
Inputs are the stored facts Resolve decides from.
type Owner ¶
type Owner string
Owner is the component whose certificate visitors actually receive.
type RouteReader ¶
type RouteReader interface {
ListProxyRouteStatus(ctx context.Context) ([]store.ProxyRouteStatus, error)
}
RouteReader lists the managed proxy routes and what each one serves.
type SettingsReader ¶
type SettingsReader interface {
GetIngressSettings(ctx context.Context) (store.IngressSettings, error)
}
SettingsReader is the ingress settings read this package needs.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot is the stored TLS ownership state at one instant.
func Load ¶
func Load(ctx context.Context, settings SettingsReader, routes RouteReader, custom map[string]bool) Snapshot
Load reads settings and route status. Either reader may be nil, and a read error leaves that part empty so ownership degrades to the ingress's own.
func (Snapshot) ProxyHosts ¶
ProxyHosts lists every tracked hostname a proxy owns.
func (Snapshot) ProxyManaged ¶
ProxyManaged reports whether a proxy owns domain's certificate.
func (Snapshot) Route ¶
func (s Snapshot) Route(domain string) (store.ProxyRouteStatus, bool)
Route returns the managed proxy route row for domain, if one is tracked.
func (Snapshot) Suppressed ¶
Suppressed reports whether a stored certificate for domain must be ignored: every host when TLS is upstream, else the proxy-owned ones.