host_cleaning

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAllowedVolumeUsagePercentageThreshold float64 = 80.0
	LockName                                             = "host_cleaning.GC"
)

Variables

This section is empty.

Functions

func AcquireSharedHostStorageLock added in v1.2.10

func AcquireSharedHostStorageLock(ctx context.Context) (lockgate.LockHandle, error)

AcquireSharedStorageLock should be called in every process that normally work with the storage

func GetLocalDockerServerStoragePath added in v1.2.10

func GetLocalDockerServerStoragePath(ctx context.Context) (string, error)

func HostCleanup

func HostCleanup(ctx context.Context, options HostCleanupOptions) error

func HostPurge

func HostPurge(ctx context.Context, options HostPurgeOptions) error

func RunGCForLocalDockerServer added in v1.2.10

func RunGCForLocalDockerServer(ctx context.Context, opts LocalDockerServerGCOptions) error

func ShouldRunGCForLocalDockerServer added in v1.2.10

func ShouldRunGCForLocalDockerServer(ctx context.Context, opts LocalDockerServerGCOptions) (bool, error)

Types

type CommonOptions

type CommonOptions struct {
	RmForce                       bool
	RmiForce                      bool
	SkipUsedImages                bool
	RmContainersThatUseWerfImages bool
	DryRun                        bool
}

type HostCleanupOptions

type HostCleanupOptions struct {
	DryRun                                bool
	AllowedVolumeUsagePercentageThreshold int64
	Force                                 bool
	DockerServerStoragePath               string
}

type HostPurgeOptions

type HostPurgeOptions struct {
	DryRun                        bool
	RmContainersThatUseWerfImages bool
}

type ImagesLruSort added in v1.2.10

type ImagesLruSort []*LocalImageDesc

func (ImagesLruSort) Len added in v1.2.10

func (a ImagesLruSort) Len() int

func (ImagesLruSort) Less added in v1.2.10

func (a ImagesLruSort) Less(i, j int) bool

func (ImagesLruSort) Swap added in v1.2.10

func (a ImagesLruSort) Swap(i, j int)

type LocalDockerServerGCOptions added in v1.2.10

type LocalDockerServerGCOptions struct {
	AllowedVolumeUsagePercentageThreshold int64
	DryRun                                bool
	Force                                 bool
	DockerServerStoragePath               string
}

type LocalImageDesc added in v1.2.10

type LocalImageDesc struct {
	ImageSummary types.ImageSummary
	LastUsedAt   time.Time
}

type VolumeUsage added in v1.2.10

type VolumeUsage struct {
	UsedBytes  uint64
	TotalBytes uint64
	Percentage float64
}

func GetVolumeUsageByPath added in v1.2.10

func GetVolumeUsageByPath(ctx context.Context, path string) (VolumeUsage, error)

Jump to

Keyboard shortcuts

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