tlsreload

package
v0.0.54 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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