docker

package
v0.0.0-...-27e9d4f Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 9 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() (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) ConnectContainerToNetwork

func (c *Client) ConnectContainerToNetwork(ctx context.Context, networkID, containerID string) error

func (*Client) CreateContainer

func (c *Client) CreateContainer(ctx context.Context, imageName string, env []string) (string, error)

func (*Client) CreateContainerInNetwork

func (c *Client) CreateContainerInNetwork(
	ctx context.Context, imageName string, env []string, networkID string,
) (string, error)

func (*Client) CreateContainerInNetworkWithResources

func (c *Client) CreateContainerInNetworkWithResources(
	ctx context.Context, imageName string, env []string, networkID string, cpuQuota float64, memoryLimit int64,
) (string, error)

func (*Client) CreateContainerInNetworkWithResourcesAndPorts

func (c *Client) CreateContainerInNetworkWithResourcesAndPorts(
	ctx context.Context, imageName string, env []string, networkID string,
	cpuQuota float64, memoryLimit int64, ports []PortMapping,
) (string, error)

func (*Client) CreateContainerWithResources

func (c *Client) CreateContainerWithResources(
	ctx context.Context, imageName string, env []string, cpuQuota float64, memoryLimit int64,
) (string, error)

func (*Client) CreateContainerWithResourcesAndPorts

func (c *Client) CreateContainerWithResourcesAndPorts(
	ctx context.Context, imageName string, env []string,
	cpuQuota float64, memoryLimit int64, ports []PortMapping,
) (string, error)

func (*Client) CreatePodNetwork

func (c *Client) CreatePodNetwork(ctx context.Context, podID string) (string, error)

func (*Client) ExecInContainer

func (c *Client) ExecInContainer(ctx context.Context, containerID string, cmd []string) (int, string, error)

func (*Client) GetContainerIP

func (c *Client) GetContainerIP(ctx context.Context, containerID string) (string, error)

func (*Client) GetContainerLogs

func (c *Client) GetContainerLogs(ctx context.Context, containerID string, tail int) (string, error)

func (*Client) GetContainerStatus

func (c *Client) GetContainerStatus(ctx context.Context, containerID string) (string, error)

func (*Client) GetDNSConfig

func (c *Client) GetDNSConfig() *DNSConfig

func (*Client) GetNetworkIP

func (c *Client) GetNetworkIP(ctx context.Context, containerID, networkID string) (string, error)

func (*Client) PullImage

func (c *Client) PullImage(ctx context.Context, imageName string) error

func (*Client) RemoveContainer

func (c *Client) RemoveContainer(ctx context.Context, containerID string) error

func (*Client) RemovePodNetwork

func (c *Client) RemovePodNetwork(ctx context.Context, networkID string) error

func (*Client) SetDNSConfig

func (c *Client) SetDNSConfig(config *DNSConfig)

func (*Client) StartContainer

func (c *Client) StartContainer(ctx context.Context, containerID string) error

func (*Client) StopContainer

func (c *Client) StopContainer(ctx context.Context, containerID string) error

func (*Client) StreamContainerLogs

func (c *Client) StreamContainerLogs(ctx context.Context, containerID string, tail int) (io.ReadCloser, error)

func (*Client) WaitContainer

func (c *Client) WaitContainer(ctx context.Context, containerID string) (int64, error)

type DNSConfig

type DNSConfig struct {
	Servers []string
	Search  []string
}

type PortMapping

type PortMapping struct {
	ContainerPort int
	HostPort      int
	Protocol      string
}

Jump to

Keyboard shortcuts

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