gc

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 7 Imported by: 8 modules, 21 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gc manages garbage collection of old resources.

Index

Constants

View Source
const (
	// ConfigName is the name of the config map for garbage collection.
	ConfigName = "config-gc"

	// Disabled is the value (-1) used by various config map values to indicate
	// the setting is disabled.
	Disabled = -1
)

Variables

This section is empty.

Functions

func NewConfigFromConfigMapFunc added in v0.7.0

func NewConfigFromConfigMapFunc(ctx context.Context) func(configMap *corev1.ConfigMap) (*Config, error)

NewConfigFromConfigMapFunc creates a Config from the supplied ConfigMap func.

Types

type Config

type Config struct {
	// Duration from creation when a Revision should be considered active
	// and exempt from GC. Note that GCMaxStaleRevision may override this if set.
	// Set Disabled (-1) to disable/ignore duration and always consider active.
	RetainSinceCreateTime time.Duration
	// Duration from last active when a Revision should be considered active
	// and exempt from GC.Note that GCMaxStaleRevision may override this if set.
	// Set Disabled (-1) to disable/ignore duration and always consider active.
	RetainSinceLastActiveTime time.Duration
	// Minimum number of non-active revisions to keep before considering for GC.
	MinNonActiveRevisions int64
	// Maximum number of non-active revisions to keep before considering for GC.
	// regardless of creation or staleness time-bounds.
	// Set Disabled (-1) to disable/ignore max.
	MaxNonActiveRevisions int64
}

Config defines the tunable parameters for Garbage Collection.

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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