certificates

package
v0.0.0-...-67b0140 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ServerKey     = "tls.key"
	ServerCert    = "tls.crt"
	CertThreshold = 5 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateWatcher

type CertificateWatcher struct {
	ICertificateHandler
	Log logr.Logger
	// contains filtered or unexported fields
}

func NewCertificateWatcher

func NewCertificateWatcher(reader client.Reader, certDir string, namespace string, secretName string, log logr.Logger) *CertificateWatcher

func (*CertificateWatcher) ValidateCertificateExpiration

func (watcher *CertificateWatcher) ValidateCertificateExpiration(certData []byte, renewalThreshold time.Duration, now time.Time) (bool, error)

func (*CertificateWatcher) WaitForCertificates

func (watcher *CertificateWatcher) WaitForCertificates()

type ICertificateHandler

type ICertificateHandler interface {
	Decode(data []byte) (p *pem.Block, rest []byte)
	Parse(der []byte) (*x509.Certificate, error)
}

type ICertificateWatcher

type ICertificateWatcher interface {
	WaitForCertificates()
}

type NoOpCertificateWatcher

type NoOpCertificateWatcher struct{}

func NewNoOpCertificateWatcher

func NewNoOpCertificateWatcher() *NoOpCertificateWatcher

func (*NoOpCertificateWatcher) WaitForCertificates

func (nw *NoOpCertificateWatcher) WaitForCertificates()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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