Documentation
¶
Overview ¶
Package tlsreload owns hot reload and expiry observation for a server TLS certificate.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadCredentialFile ¶
ReadCredentialFile reads a bounded regular credential file without blocking. It follows projected-volume symlinks and reads from the descriptor it verified.
Types ¶
type Reloader ¶
type Reloader struct {
// contains filtered or unexported fields
}
Reloader atomically publishes only complete, currently valid certificate chains.
func New ¶
func New(certFile, keyFile string, diagnostics port.Diagnostics) (*Reloader, error)
New synchronously loads and validates the initial certificate, starts the projected-file watcher, and starts expiry observation. The caller must Close the returned lifecycle.
func (*Reloader) Close ¶
Close stops and joins the file watcher and expiry observer. It is idempotent.
func (*Reloader) GetCertificate ¶
func (r *Reloader) GetCertificate(*tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificate supplies the currently published certificate to tls.Config.