garbagecollector

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestMissingStrategy

func TestMissingStrategy(t *testing.T)

Types

type Revision

type Revision interface {
	State() string
	TTL() time.Duration
	CreatedOn() time.Time
}

Revision represents a picchu revision's state and ttl

func FindGarbage

func FindGarbage(log logr.Logger, strategy Strategy, revisions []Revision) ([]Revision, error)

FindGarbage returns safe-to-delete revisions according to strategy

type Strategy

type Strategy int

Strategy is an enum for different strategies

const (
	// MinimumRetired is the minimum amount of retired revisions we should keep for rollbacks
	MinimumRetired = 3
	// DefaultStrategy deletes any expired revisions, except if they are needed to fullfill the MimimumRetired quota
	DefaultStrategy Strategy = iota
)

Jump to

Keyboard shortcuts

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