garbage

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// Run runs the garbage collector. Collects every 30 seconds, or when the
	// collector is shutting down.
	Run(ctx context.Context) error

	// Push pushes a key to the garbage collector to be deleted.
	Push(key string)

	// Pop removes a key from the garbage collector.
	Pop(key string)
}

Interface is a garbage collector. It is used to queue-up deletion of ETCD keys so that they can be deleted in bulk and not interrupt triggering. Keys can be pulled from garbage collection queue. Runs every 30s.

func New

func New(opts Options) Interface

New creates a new garbage collector.

type Options

type Options struct {
	// Log is the logger for the collector to use.
	Log logr.Logger

	// Client is the ETCD client to use for deleting keys.
	Client client.Interface
}

Options is the configuration for the garbage collector.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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