docker

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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
}

func NewClient

func NewClient(ctx context.Context) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) GetContainerLogs added in v0.2.0

func (c *Client) GetContainerLogs(containerID string, tail int) (string, error)

func (*Client) ListContainers

func (c *Client) ListContainers() ([]ContainerInfo, error)

func (*Client) ListContainersWithStats added in v0.2.0

func (c *Client) ListContainersWithStats(includeStats bool) ([]ContainerInfo, error)

func (*Client) RemoveContainer

func (c *Client) RemoveContainer(containerID string) error

func (*Client) RestartContainer

func (c *Client) RestartContainer(containerID string) error

func (*Client) StartContainer

func (c *Client) StartContainer(containerID string) error

func (*Client) StopContainer

func (c *Client) StopContainer(containerID string) error

type ContainerInfo

type ContainerInfo struct {
	ID        string
	Name      string
	Image     string
	State     string
	Status    string
	CPUPerc   float64
	MemPerc   float64
	MemUsage  string
	NetRx     uint64 // Network bytes received
	NetTx     uint64 // Network bytes transmitted
	NetIO     string
	BlockIO   string
	CreatedAt time.Time
	Labels    map[string]string
}

Jump to

Keyboard shortcuts

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