diskcertmanager

package
v1.11.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CertFilePath     string
	KeyFilePath      string
	FileSyncInterval time.Duration
}

type DiskCertManager

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

DiskCertManager is a certificate manager that loads certificates from disk, and watches for changes.

func New

func New(config *Config, clk clock.Clock, log logrus.FieldLogger) (*DiskCertManager, error)

func (*DiskCertManager) GetTLSConfig

func (m *DiskCertManager) GetTLSConfig() *tls.Config

TLSConfig returns a TLS configuration that uses the provided certificate stored on disk.

func (*DiskCertManager) WatchFileChanges

func (m *DiskCertManager) WatchFileChanges(ctx context.Context)

WatchFileChanges starts a file watcher to watch for changes to the cert and key files.

Jump to

Keyboard shortcuts

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