cleanup

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleaner

type Cleaner struct {
	// contains filtered or unexported fields
}

Cleaner handles cleanup operations on the server

func NewCleaner

func NewCleaner(client *ssh.Client, projectName string, verbose bool) *Cleaner

NewCleaner creates a new cleaner

func (*Cleaner) CleanBuildCache

func (c *Cleaner) CleanBuildCache() error

CleanBuildCache removes Docker build cache

func (*Cleaner) CleanDanglingImages

func (c *Cleaner) CleanDanglingImages() error

CleanDanglingImages removes dangling Docker images (not tagged)

func (*Cleaner) CleanOldImages

func (c *Cleaner) CleanOldImages(keepLatest int) error

CleanOldImages removes old Docker images for this project Keeps the latest N images (default 3)

func (*Cleaner) CleanStoppedContainers

func (c *Cleaner) CleanStoppedContainers() error

CleanStoppedContainers removes stopped containers for this project

func (*Cleaner) CleanUnusedVolumes

func (c *Cleaner) CleanUnusedVolumes() error

CleanUnusedVolumes removes unused Docker volumes

func (*Cleaner) FullCleanup

func (c *Cleaner) FullCleanup(keepImages int) (*CleanupResult, error)

FullCleanup performs all cleanup operations

func (*Cleaner) GetDiskUsage

func (c *Cleaner) GetDiskUsage() (string, error)

GetDiskUsage returns disk usage information

func (*Cleaner) GetDockerDiskUsage

func (c *Cleaner) GetDockerDiskUsage() (string, error)

GetDockerDiskUsage returns Docker disk usage

func (*Cleaner) RotateLogs

func (c *Cleaner) RotateLogs() error

RotateLogs manually triggers log rotation (in addition to automatic)

func (*Cleaner) SecureLogPermissions

func (c *Cleaner) SecureLogPermissions() error

SecureLogPermissions ensures log files have proper permissions

type CleanupResult

type CleanupResult struct {
	ImagesRemoved     int
	ContainersRemoved int
	SpaceReclaimed    string
	Errors            []string
}

CleanupResult holds results of cleanup operations

Jump to

Keyboard shortcuts

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