tlsreload

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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

func ReadCredentialFile(path string) ([]byte, error)

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

func (r *Reloader) Close() error

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.

Jump to

Keyboard shortcuts

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