Documentation
¶
Overview ¶
Package docker provides Docker client functionality for WhaleTUI.
Index ¶
- type Client
- func (c *Client) AttachContainer(ctx context.Context, id string) (types.HijackedResponse, error)
- func (c *Client) Close() error
- func (c *Client) ExecContainer(ctx context.Context, id string, command []string, _ bool) (string, error)
- func (c *Client) GetConnectionMethod() string
- func (c *Client) GetContainerLogs(ctx context.Context, id string) (string, error)
- func (c *Client) GetContainerStats(ctx context.Context, id string) (map[string]any, error)
- func (c *Client) GetInfo(ctx context.Context) (map[string]any, error)
- func (c *Client) GetSwarmServiceLogs(ctx context.Context, id string) (string, error)
- func (c *Client) InspectContainer(ctx context.Context, id string) (map[string]any, error)
- func (c *Client) InspectImage(ctx context.Context, id string) (map[string]any, error)
- func (c *Client) InspectNetwork(ctx context.Context, id string) (map[string]any, error)
- func (c *Client) InspectSwarmNode(ctx context.Context, id string) (swarm.Node, error)
- func (c *Client) InspectSwarmService(ctx context.Context, id string) (swarm.Service, error)
- func (c *Client) InspectVolume(ctx context.Context, name string) (map[string]any, error)
- func (c *Client) ListContainers(ctx context.Context, all bool) ([]Container, error)
- func (c *Client) ListImages(ctx context.Context) ([]Image, error)
- func (c *Client) ListNetworks(ctx context.Context) ([]Network, error)
- func (c *Client) ListSwarmNodes(ctx context.Context) ([]swarm.Node, error)
- func (c *Client) ListSwarmServices(ctx context.Context) ([]swarm.Service, error)
- func (c *Client) ListVolumes(ctx context.Context) ([]Volume, error)
- func (c *Client) RemoveContainer(ctx context.Context, id string, force bool) error
- func (c *Client) RemoveImage(ctx context.Context, id string, force bool) error
- func (c *Client) RemoveNetwork(ctx context.Context, id string) error
- func (c *Client) RemoveSwarmNode(ctx context.Context, id string, force bool) error
- func (c *Client) RemoveSwarmService(ctx context.Context, id string) error
- func (c *Client) RemoveVolume(ctx context.Context, name string, force bool) error
- func (c *Client) RestartContainer(ctx context.Context, id string, timeout *time.Duration) error
- func (c *Client) StartContainer(ctx context.Context, id string) error
- func (c *Client) StopContainer(ctx context.Context, id string, timeout *time.Duration) error
- func (c *Client) UpdateSwarmNode(ctx context.Context, id string, version swarm.Version, spec swarm.NodeSpec) error
- func (c *Client) UpdateSwarmService(ctx context.Context, id string, version swarm.Version, spec swarm.ServiceSpec) error
- type Container
- type Image
- type Network
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// Services for domain-specific operations
Container *services.ContainerService
Image *services.ImageService
Volume *services.VolumeService
Network *services.NetworkService
Swarm *services.SwarmService
// contains filtered or unexported fields
}
Client represents a Docker client wrapper
func (*Client) AttachContainer ¶
AttachContainer attaches to a running container
func (*Client) ExecContainer ¶
func (c *Client) ExecContainer( ctx context.Context, id string, command []string, _ bool, ) (string, error)
ExecContainer executes a command in a running container and returns the output
func (*Client) GetConnectionMethod ¶ added in v0.4.0
GetConnectionMethod returns the connection method used for this Docker client
func (*Client) GetContainerLogs ¶
GetContainerLogs retrieves container logs
func (*Client) GetContainerStats ¶
GetContainerStats gets container stats
func (*Client) GetSwarmServiceLogs ¶
GetSwarmServiceLogs gets logs for a swarm service
func (*Client) InspectContainer ¶
InspectContainer inspects a container
func (*Client) InspectImage ¶
InspectImage inspects an image
func (*Client) InspectNetwork ¶
InspectNetwork inspects a network
func (*Client) InspectSwarmNode ¶
InspectSwarmNode inspects a swarm node
func (*Client) InspectSwarmService ¶
InspectSwarmService inspects a swarm service
func (*Client) InspectVolume ¶
InspectVolume inspects a volume
func (*Client) ListContainers ¶
ListContainers lists all containers
func (*Client) ListImages ¶
ListImages lists all images
func (*Client) ListNetworks ¶
ListNetworks lists all networks
func (*Client) ListSwarmNodes ¶
ListSwarmNodes lists all swarm nodes
func (*Client) ListSwarmServices ¶
ListSwarmServices lists all swarm services
func (*Client) ListVolumes ¶
ListVolumes lists all volumes
func (*Client) RemoveContainer ¶
RemoveContainer removes a container
func (*Client) RemoveImage ¶
RemoveImage removes an image
func (*Client) RemoveNetwork ¶
RemoveNetwork removes a network
func (*Client) RemoveSwarmNode ¶
RemoveSwarmNode removes a swarm node
func (*Client) RemoveSwarmService ¶
RemoveSwarmService removes a swarm service
func (*Client) RemoveVolume ¶
RemoveVolume removes a volume
func (*Client) RestartContainer ¶
RestartContainer restarts a container
func (*Client) StartContainer ¶
StartContainer starts a container
func (*Client) StopContainer ¶
StopContainer stops a container