secretexpire

package
v0.0.0-...-ac56535 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package secretexpire provides a worker for tracking and notifying when a secret revision should expire.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

New returns a Secret Expiry Worker backed by config, or an error.

Types

type Config

type Config struct {
	SecretManagerFacade SecretManagerFacade
	Logger              Logger
	Clock               clock.Clock

	SecretOwners    []names.Tag
	ExpireRevisions chan<- []string
}

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 Logger

type Logger interface {
	Debugf(string, ...interface{})
	Warningf(string, ...interface{})
}

Logger represents the methods used by the worker to log information.

type SecretManagerFacade

type SecretManagerFacade interface {
	WatchSecretRevisionsExpiryChanges(ownerTags ...names.Tag) (watcher.SecretTriggerWatcher, error)
}

SecretManagerFacade instances provide a watcher for secret revision expiry changes.

type Worker

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

Worker fires events when secret revisions should be expired.

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