Documentation
¶
Index ¶
- type CacheItem
- type Client
- func (c *Client) DeleteContainer(ctx context.Context, shortID string) error
- func (c *Client) DeleteImage(ctx context.Context, shortID string) error
- func (c *Client) DeleteVolume(ctx context.Context, name string) error
- func (c *Client) DiskUsageSummary(ctx context.Context) (DiskSummary, error)
- func (c *Client) ListBuildCache(ctx context.Context) ([]CacheItem, error)
- func (c *Client) ListReclaimableImages(ctx context.Context) ([]ImageItem, error)
- func (c *Client) ListStoppedContainers(ctx context.Context) ([]ContainerItem, error)
- func (c *Client) ListUnusedVolumes(ctx context.Context) ([]VolumeItem, error)
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) PruneCache(ctx context.Context) (int64, error)
- type ContainerItem
- type DiskSummary
- type ImageItem
- type VolumeItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the Docker SDK client with helper methods.
func (*Client) DeleteContainer ¶
DeleteContainer removes a stopped container.
func (*Client) DeleteImage ¶
DeleteImage removes an image by short ID.
func (*Client) DeleteVolume ¶
DeleteVolume removes a volume by name.
func (*Client) DiskUsageSummary ¶
func (c *Client) DiskUsageSummary(ctx context.Context) (DiskSummary, error)
func (*Client) ListBuildCache ¶
ListBuildCache returns all build cache entries via DiskUsage.
func (*Client) ListReclaimableImages ¶
ListReclaimableImages returns images that are dangling or not used by any container.
func (*Client) ListStoppedContainers ¶
func (c *Client) ListStoppedContainers(ctx context.Context) ([]ContainerItem, error)
ListStoppedContainers returns all non-running containers.
func (*Client) ListUnusedVolumes ¶
func (c *Client) ListUnusedVolumes(ctx context.Context) ([]VolumeItem, error)
ListUnusedVolumes returns volumes not mounted by any container.
type ContainerItem ¶
type ContainerItem struct {
ID string
Name string
Image string
Size int64
Age time.Duration
Project string
Status string
}
ContainerItem holds info about a stopped container.
type DiskSummary ¶
type DiskSummary struct {
TotalImages int64
TotalContainers int64
TotalVolumes int64
TotalCache int64
}
DiskSummary holds totals from Docker's DiskUsage API.
Click to show internal directories.
Click to hide internal directories.