dynamiccert

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicCertificate

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

DynamicCertificate implements tls.Config.GetCertificate. It returns a TLS certificate and refreshes if needed.

func New

func New(certFile, keyFile string, opts ...Option) (*DynamicCertificate, error)

New returns a new instance of DynamicCertificate.

func (*DynamicCertificate) GetCertificate

func (dc *DynamicCertificate) GetCertificate(_ *tls.ClientHelloInfo) (*tls.Certificate, error)

GetCertificate returns the current loaded certificate.

type Option

type Option func(*DynamicCertificate)

Option can be used to configure DynamicCertificate.

func WithLogger

func WithLogger(log logr.Logger) Option

WithLogger sets the logger for DynamicCertificate.

func WithRefreshInterval

func WithRefreshInterval(interval time.Duration) Option

WithRefreshInterval sets the interval that will be used to periodically check if the TLS certificate should be refreshed.

Jump to

Keyboard shortcuts

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