Documentation
¶
Overview ¶
Package controller provides the logic for interacting with container engines.
Package controller provides the logic for interacting with container engines.
Package controller provides the logic for interacting with container engines.
Package controller provides the logic for interacting with container engines.
Package controller provides the logic for interacting with container engines.
Index ¶
- func AdvancedCleanup() (string, error)
- func BasicCleanup() (string, error)
- func GetContainerLogs(idOrName string) (string, error)
- func InspectContainer(idOrName string) (string, error)
- func InspectNetwork(idOrName string) (string, error)
- func RemoveContainer(idOrName string) error
- func RemoveImage(idOrName string) error
- func RemoveVolume(name string) error
- func StartContainer(idOrName string) error
- func StopContainer(idOrName string) error
- func TotalCleanup() (string, error)
- type Container
- type Image
- type Network
- type SystemInfo
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdvancedCleanup ¶
AdvancedCleanup removes dangling volumes and dangling images.
func BasicCleanup ¶
BasicCleanup removes stopped containers, unused networks, and unused images.
func GetContainerLogs ¶
GetContainerLogs retrieves the logs of a container.
func InspectContainer ¶
InspectContainer inspects a container by its ID or name and returns its raw JSON output.
func InspectNetwork ¶
InspectNetwork inspects a network and returns its raw JSON output.
func RemoveContainer ¶
RemoveContainer removes a container by its ID or name.
func RemoveImage ¶
RemoveImage removes an image by its ID or name.
func StartContainer ¶
StartContainer starts a container by its ID or name.
func StopContainer ¶
StopContainer stops a container by its ID or name.
func TotalCleanup ¶
TotalCleanup prunes all unused containers, images, volumes, and networks.
Types ¶
type Container ¶
type Container struct {
ID string
Image string
Command string
Created string
Status string
Ports string
Names string
}
Container represents a container's simplified information.
func ListContainers ¶
ListContainers lists all running and stopped containers.
type SystemInfo ¶
type SystemInfo struct {
Containers int // Total number of containers.
Running int // Number of running containers.
Paused int // Number of paused containers.
Stopped int // Number of stopped containers.
Images int // Total number of images.
Volumes int // Total number of volumes.
Networks int // Total number of networks.
DiskUsage string
}
SystemInfo holds system-wide statistics about containers, images, volumes, and networks.
func GetSystemInfo ¶
func GetSystemInfo() (SystemInfo, error)
GetSystemInfo retrieves system-wide information about containers, images, and volumes.