imagegc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCManager

type GCManager interface {
	// GarbageCollect can be called in a go-routine to delete unused image
	GarbageCollect() error

	// Start sync up the images with detected time and lastUsedTime
	Start() error
}

func NewImageManagerImpl

func NewImageManagerImpl(policy *GCPolicy, client *client.Client) (GCManager, error)

type GCPolicy

type GCPolicy struct {
	// Any usage above this threshold will always trigger garbage collection.
	// This is the highest usage we will allow.
	HighThresholdPercent float64

	// Any usage below this threshold will never trigger garbage collection.
	// This is the lowest threshold we will try to garbage collect to.
	LowThresholdPercent float64

	// Minimum age at which an image can be garbage collected.
	MinAge time.Duration

	// GC interval
	GCInterval time.Duration
}

Jump to

Keyboard shortcuts

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