Documentation
¶
Index ¶
- func ApplyPreset(preset config.PrunePreset, images []ImageInfo, volumes []VolumeInfo, ...) (imageIDs, volumeNames, containerIDs []string)
- func CategoryLabel(cat SafetyCategory) string
- func EstimateReclaimable(images []ImageInfo, selectedImageIDs []string, volumes []VolumeInfo, ...) int64
- type BuildCacheInfo
- type Client
- func (c *Client) Close() error
- func (c *Client) GetDiskUsage() ([]ImageInfo, []ContainerInfo, []VolumeInfo, BuildCacheInfo, error)
- func (c *Client) ListContainers() ([]ContainerInfo, error)
- func (c *Client) ListImages() ([]ImageInfo, error)
- func (c *Client) ListNetworks() ([]NetworkInfo, error)
- func (c *Client) ListVolumes() ([]VolumeInfo, error)
- func (c *Client) PruneBuildCache() (int64, error)
- func (c *Client) RemoveContainer(id string) error
- func (c *Client) RemoveImage(id string) error
- func (c *Client) RemoveNetwork(id string) error
- func (c *Client) RemoveVolume(name string) error
- type ContainerInfo
- type ImageInfo
- type NetworkInfo
- type ProtectionEngine
- type SafetyCategory
- func CategorizeContainer(ctr ContainerInfo, protectionPatterns []string) SafetyCategory
- func CategorizeImage(img ImageInfo, protectionPatterns []string) SafetyCategory
- func CategorizeNetwork(net NetworkInfo, protectionPatterns []string) SafetyCategory
- func CategorizeVolume(vol VolumeInfo, protectionPatterns []string) SafetyCategory
- type VolumeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyPreset ¶
func ApplyPreset( preset config.PrunePreset, images []ImageInfo, volumes []VolumeInfo, containers []ContainerInfo, protection *ProtectionEngine, ) (imageIDs, volumeNames, containerIDs []string)
func CategoryLabel ¶
func CategoryLabel(cat SafetyCategory) string
func EstimateReclaimable ¶
func EstimateReclaimable( images []ImageInfo, selectedImageIDs []string, volumes []VolumeInfo, selectedVolumeNames []string, ) int64
Types ¶
type BuildCacheInfo ¶
type BuildCacheInfo struct {
TotalSize int64
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetDiskUsage ¶
func (c *Client) GetDiskUsage() ([]ImageInfo, []ContainerInfo, []VolumeInfo, BuildCacheInfo, error)
func (*Client) ListContainers ¶
func (c *Client) ListContainers() ([]ContainerInfo, error)
func (*Client) ListImages ¶
func (*Client) ListNetworks ¶ added in v0.2.0
func (c *Client) ListNetworks() ([]NetworkInfo, error)
func (*Client) ListVolumes ¶
func (c *Client) ListVolumes() ([]VolumeInfo, error)
func (*Client) PruneBuildCache ¶
func (*Client) RemoveContainer ¶
func (*Client) RemoveImage ¶
func (*Client) RemoveNetwork ¶ added in v0.2.0
func (*Client) RemoveVolume ¶
type ContainerInfo ¶
type NetworkInfo ¶
type ProtectionEngine ¶
type ProtectionEngine struct {
// contains filtered or unexported fields
}
func NewProtectionEngine ¶
func NewProtectionEngine(patterns []string) *ProtectionEngine
func (*ProtectionEngine) IsProtected ¶
func (pe *ProtectionEngine) IsProtected(name string) bool
func (*ProtectionEngine) MatchesPattern ¶
func (pe *ProtectionEngine) MatchesPattern(name string) bool
func (*ProtectionEngine) Protect ¶
func (pe *ProtectionEngine) Protect(name string)
func (*ProtectionEngine) Unprotect ¶
func (pe *ProtectionEngine) Unprotect(name string)
type SafetyCategory ¶
type SafetyCategory int
const ( CategorySafe SafetyCategory = 1 CategoryProbablySafe SafetyCategory = 2 CategoryCheckFirst SafetyCategory = 3 CategoryDoNotTouch SafetyCategory = 4 )
func CategorizeContainer ¶
func CategorizeContainer( ctr ContainerInfo, protectionPatterns []string, ) SafetyCategory
func CategorizeImage ¶
func CategorizeImage( img ImageInfo, protectionPatterns []string, ) SafetyCategory
func CategorizeNetwork ¶ added in v0.2.0
func CategorizeNetwork( net NetworkInfo, protectionPatterns []string, ) SafetyCategory
func CategorizeVolume ¶
func CategorizeVolume( vol VolumeInfo, protectionPatterns []string, ) SafetyCategory
Click to show internal directories.
Click to hide internal directories.