cert

package
v0.0.0-...-87e21a1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 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 Logger

type Logger interface {
	Infof(string, ...interface{})
	Debugf(string, ...interface{})
	Errorf(string, ...interface{})
}

Logger is an interface that wraps the basic logger methods.

type Watcher

type Watcher struct {
	CertFile string
	KeyFile  string

	Log Logger
	// contains filtered or unexported fields
}

Watcher represents a certificate manager able to watch certificate and key pairs for changes.

func (*Watcher) Stop

func (w *Watcher) Stop()

Stop tells Watcher to stop watching for changes to the certificate and key files.

func (*Watcher) TLSConfig

func (w *Watcher) TLSConfig() *tls.Config

TLSConfig creates a new dynamically loaded tls.Config, in which changes to the certificate are reflected in.

func (*Watcher) Watch

func (w *Watcher) Watch() error

Watch starts watching for changes to the certificate and key files. On any change the certificate and key are reloaded. If there is an issue the load will fail and the old certificate and key will continue to be served.

Jump to

Keyboard shortcuts

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