garbagecollection

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GarbageCollector

type GarbageCollector struct {
	CachePath      string
	Logger         logr.Logger
	MetadataClient metadata.Interface
	Interval       time.Duration
}

GarbageCollector is an implementation of the manager.Runnable interface for running garbage collection on the Catalog content cache that is served by the catalogd HTTP server. It runs in a loop and will ensure that no cache entries exist for Catalog resources that no longer exist. This should only clean up cache entries that were missed by the handling of a DELETE event on a Catalog resource.

func (*GarbageCollector) Start

func (gc *GarbageCollector) Start(ctx context.Context) error

Start will start the garbage collector. It will always run once on startup and loop until context is canceled after an initial garbage collection run. Garbage collection will run again every X amount of time, where X is the supplied garbage collection interval.

Jump to

Keyboard shortcuts

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