svid

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DefaultRotatorInterval = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Observer

type Observer interface {
	State() State
}

Observer is a convenience interface for subsystems that only want to observer the current SVID state but don't care about other rotator methods.

type ObserverFunc

type ObserverFunc func() State

func (ObserverFunc) State

func (fn ObserverFunc) State() State

type Rotator

type Rotator interface {
	Initialize(ctx context.Context) error
	Run(ctx context.Context) error

	State() State
	Subscribe() observer.Stream
}

Rotator is an interface for a SVID rotator

func NewRotator

func NewRotator(c *RotatorConfig) Rotator

type RotatorConfig

type RotatorConfig struct {
	Log         logrus.FieldLogger
	Metrics     telemetry.Metrics
	TrustDomain url.URL
	ServerCA    ca.ServerCA
	Clock       clock.Clock

	// How long to wait between expiry checks
	Interval time.Duration
}

type State

type State struct {
	SVID []*x509.Certificate
	Key  *ecdsa.PrivateKey
}

State is the current SVID and key

Jump to

Keyboard shortcuts

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