host_cleaning

package
v1.2.18 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAllowedDockerStorageVolumeUsagePercentage       float64 = 70.0
	DefaultAllowedDockerStorageVolumeUsageMarginPercentage float64 = 5.0
	DefaultAllowedLocalCacheVolumeUsagePercentage          float64 = 70.0
	DefaultAllowedLocalCacheVolumeUsageMarginPercentage    float64 = 5.0
)
View Source
const (
	MinImagesToDelete = 10
)

Variables

This section is empty.

Functions

func GetLocalDockerServerStoragePath added in v1.2.10

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

func HostPurge

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

func RunAutoHostCleanup added in v1.2.11

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

func RunGCForLocalDockerServer added in v1.2.10

func RunGCForLocalDockerServer(ctx context.Context, allowedVolumeUsagePercentage, allowedVolumeUsageMarginPercentage float64, dockerServerStoragePath string, force, dryRun bool) error

func RunHostCleanup added in v1.2.11

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

func ShouldRunAutoGCForLocalDockerServer added in v1.2.11

func ShouldRunAutoGCForLocalDockerServer(ctx context.Context, allowedVolumeUsagePercentage float64, dockerServerStoragePath string) (bool, error)

func ShouldRunAutoHostCleanup added in v1.2.11

func ShouldRunAutoHostCleanup(ctx context.Context, options HostCleanupOptions) (bool, error)

Types

type CommonOptions

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

type HostCleanupOptions

type HostCleanupOptions struct {
	AllowedDockerStorageVolumeUsagePercentage       *uint
	AllowedDockerStorageVolumeUsageMarginPercentage *uint
	AllowedLocalCacheVolumeUsagePercentage          *uint
	AllowedLocalCacheVolumeUsageMarginPercentage    *uint

	DryRun                  bool
	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 LocalDockerServerStorageCheckResult added in v1.2.11

type LocalDockerServerStorageCheckResult struct {
	VolumeUsage      volumeutils.VolumeUsage
	TotalImagesBytes uint64
	ImagesDescs      []*LocalImageDesc
}

func GetLocalDockerServerStorageCheck added in v1.2.11

func GetLocalDockerServerStorageCheck(ctx context.Context, dockerServerStoragePath string) (*LocalDockerServerStorageCheckResult, error)

func (*LocalDockerServerStorageCheckResult) GetBytesToFree added in v1.2.11

func (checkResult *LocalDockerServerStorageCheckResult) GetBytesToFree(targetVolumeUsage float64) uint64

type LocalImageDesc added in v1.2.10

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

Jump to

Keyboard shortcuts

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