cert

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reloader

type Reloader struct {
	// contains filtered or unexported fields
}

Reloader helps implementing TLS client/server that reloads certificates on a filesystem automatically.

func NewReloader

func NewReloader(dir string, log logr.Logger) (*Reloader, error)

NewReloader creates a Realoder that loads certificates from `dir`. The directory must contain these files.

- ca.crt: CA certificate bundle in PEM format - tls.crt: The TLS certificate to be used. - tls.key: The private key.

func (*Reloader) Run

func (r *Reloader) Run(ctx context.Context, interval time.Duration)

Run checks updates of the certificate files at every `interval` until `ctx` is canceled. This should be called as a goroutine.

func (*Reloader) TLSClientConfig

func (r *Reloader) TLSClientConfig() *tls.Config

func (*Reloader) TLSServerConfig

func (r *Reloader) TLSServerConfig() *tls.Config

Jump to

Keyboard shortcuts

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