secretbackendrotate

package
v0.0.0-...-23dbee4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package secretbackendrotate provides a worker for tracking and rotating a secret backend token.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency.Manifold that runs a secretbackendrotate worker.

func NewWorker

func NewWorker(config Config) (worker.Worker, error)

NewWorker returns a Secret Backend token rotation Worker backed by config, or an error.

Types

type Config

type Config struct {
	SecretBackendManagerFacade SecretBackendManagerFacade
	Logger                     logger.Logger
	Clock                      clock.Clock
}

Config defines the operation of the Worker.

func (Config) Validate

func (config Config) Validate() error

Validate returns an error if config cannot drive the Worker.

type ManifoldConfig

type ManifoldConfig struct {
	Logger        logger.Logger
	APICallerName string
}

ManifoldConfig holds dependencies and configuration for a secretbackendrotate worker.

func (ManifoldConfig) Validate

func (c ManifoldConfig) Validate() error

Validate validates a manifold config.

type SecretBackendManagerFacade

type SecretBackendManagerFacade interface {
	WatchTokenRotationChanges(context.Context) (watcher.SecretBackendRotateWatcher, error)
	RotateBackendTokens(ctx context.Context, info ...string) error
}

SecretBackendManagerFacade instances provide a watcher for secret rotation changes.

type Worker

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

Worker fires events when secrets should be rotated.

func (*Worker) Kill

func (w *Worker) Kill()

Kill is defined on worker.Worker.

func (*Worker) Wait

func (w *Worker) Wait() error

Wait is part of the worker.Worker interface.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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