docker

package
v0.0.0-...-f15adfa Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 10 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
}

Client implements runtime.ContainerRuntime using the Docker go-sdk.

func New

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

New creates a new Docker runtime client using the go-sdk.

func (*Client) Close

func (c *Client) Close() error

Close closes the underlying Docker client.

func (*Client) GetContainer

func (c *Client) GetContainer(ctx context.Context, nameOrID string) (*domain.ContainerInfo, error)

GetContainer returns a single container by name or ID.

func (*Client) ListContainers

func (c *Client) ListContainers(ctx context.Context) ([]domain.ContainerInfo, error)

ListContainers returns all containers with the koncord.enable=true label.

func (*Client) RestartContainer

func (c *Client) RestartContainer(ctx context.Context, nameOrID string) error

RestartContainer restarts a container by name or ID.

func (*Client) StreamLogs

func (c *Client) StreamLogs(ctx context.Context, nameOrID string, since time.Time) (io.ReadCloser, error)

StreamLogs returns a reader streaming container logs.

Jump to

Keyboard shortcuts

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