Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GarbageCollector ¶
type GarbageCollector struct {
// CachePaths is the list of directories to garbage-collect. Each directory
// is expected to contain only subdirectories named after existing ClusterCatalogs;
// any entry whose name does not match a known ClusterCatalog — including orphaned
// temporary directories left by interrupted operations — is removed.
CachePaths []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.