secretexpire

package
v0.0.0-...-4308112 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 11 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.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 SecretManagerFacade

type SecretManagerFacade interface {
	WatchSecretRevisionsExpiryChanges(ctx context.Context, 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