Documentation
¶
Index ¶
- func HTTPRedirect(next http.Handler) http.Handler
- func NewListener(l net.Listener, storage TLSStorage, caCert *x509.Certificate, ...) (net.Listener, http.Handler, error)deprecated
- func NewListenerWithChain(l net.Listener, storage TLSStorage, caCert []*x509.Certificate, ...) (net.Listener, http.Handler, error)
- func NewTCPListener(ip string, port int) (net.Listener, error)
- func OnlyAllow(str string) func(...string) []string
- type Config
- type SetFactory
- type TLSFactory
- type TLSStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPRedirect ¶ added in v0.2.0
Approach taken from letsencrypt, except manglePort is specific to us
func NewListener
deprecated
added in
v0.2.0
func NewListenerWithChain ¶ added in v0.3.6
func NewTCPListener ¶ added in v0.2.0
Types ¶
type Config ¶ added in v0.2.0
type Config struct {
CN string
Organization []string
TLSConfig *tls.Config
SANs []string
MaxSANs int
ExpirationDaysCheck int
CloseConnOnCertChange bool
RegenerateCerts func() bool
FilterCN func(...string) []string
// FilterExisting controls whether FilterCN is also applied to the set of
// CNs already recorded on the secret (via listener.cattle.io/cn-*
// annotations) during every cert operation (AddCN, Merge, Renew,
// Regenerate, cert generation). When true, any existing CN that FilterCN
// would reject is pruned from the certificate on the next write — useful
// for automatically removing stale dynamically-added CNs (e.g. dead pod
// IPs after a rolling restart) without an explicit delete-and-regenerate.
// false (the default) preserves all existing CNs as before.
FilterExisting bool
}
type SetFactory ¶ added in v0.2.0
type SetFactory interface {
SetFactory(tls TLSFactory)
}
type TLSFactory ¶ added in v0.2.1
type TLSFactory interface {
Renew(secret *v1.Secret) (*v1.Secret, error)
AddCN(secret *v1.Secret, cn ...string) (*v1.Secret, bool, error)
Merge(target *v1.Secret, additional *v1.Secret) (*v1.Secret, bool, error)
Filter(cn ...string) []string
NeedsUpdate(maxSANs int, secret *v1.Secret, cn ...string) bool
Regenerate(secret *v1.Secret) (*v1.Secret, error)
}
Click to show internal directories.
Click to hide internal directories.