cleaner

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Active

type Active struct {
	BuildCache int
	Containers int
	Volumes    int
}

type Cleaner

type Cleaner struct {
	Docker *client.Client
	Ctx    context.Context
	Log    *logrus.Entry
	Dir    string
	TTL    time.Duration
}

func New

func New(client *client.Client, ctx context.Context, log *logrus.Entry, dir string, ttl time.Duration) *Cleaner

func (*Cleaner) BuildCachePrune

func (Cleaner *Cleaner) BuildCachePrune() (uint64, error)

func (*Cleaner) ContainersPrune

func (Cleaner *Cleaner) ContainersPrune() (uint64, error)

func (*Cleaner) DeviceSpaceUsage

func (Cleaner *Cleaner) DeviceSpaceUsage(device string) (*SystemDiskUsage, error)

GB, Percent, Error

func (*Cleaner) DockerDiskUsage

func (Cleaner *Cleaner) DockerDiskUsage() (*DockerDiskUsage, error)

func (*Cleaner) GetDiskUtilization

func (Cleaner *Cleaner) GetDiskUtilization(path string) (uint64, float64, error)

func (*Cleaner) GetUsageInfo

func (Cleaner *Cleaner) GetUsageInfo() (*DiskUsage, error)

func (*Cleaner) ImagesPrune

func (Cleaner *Cleaner) ImagesPrune(args filters.Args) (uint64, error)

func (*Cleaner) NetworksPrune added in v0.1.3

func (Cleaner *Cleaner) NetworksPrune() (int, error)

func (*Cleaner) VolumesPrune

func (Cleaner *Cleaner) VolumesPrune() (uint64, error)

type DiskUsage

type DiskUsage struct {
	System *SystemDiskUsage
	Docker *DockerDiskUsage
}

type DiskUsageSummary

type DiskUsageSummary struct {
	Size        int64
	Reclaimable int64
}

type DockerDiskUsage

type DockerDiskUsage struct {
	BuildCache DiskUsageSummary
	Containers DiskUsageSummary
	Volumes    DiskUsageSummary
	Images     DiskUsageSummary
}

type SystemDiskUsage

type SystemDiskUsage struct {
	Bytes    int64
	Percents float64
}

Jump to

Keyboard shortcuts

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