docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: MIT Imports: 14 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 is an adapter for the Docker Engine API client to our domain.

func NewClient

func NewClient(dockerClient *client.Client) *Client

NewClient returns a new Client wrapping the given Docker Engine API client.

func (*Client) FetchContainerLogs

func (c *Client) FetchContainerLogs(ctx context.Context, query log.Query) (io.ReadCloser, error)

FetchContainerLogs returns a filtered stream of logs from the specified Docker container. If the container cannot be found it returns a *log.Error.

func (*Client) ListContainers

func (c *Client) ListContainers(ctx context.Context) ([]log.Container, error)

ListContainers fetches the list of all containers in Docker (docker ps -a).

func (*Client) WatchContainersStart

func (c *Client) WatchContainersStart(ctx context.Context) (<-chan log.Container, <-chan error)

WatchContainersStart returns a stream of events the caller can consume to be notified when a new running container is detected.

Jump to

Keyboard shortcuts

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