docker

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.1.3

type Client struct {
	// contains filtered or unexported fields
}

Client wraps a *dockerclient.Client and holds the subsystem logger. It is initialized once at startup and shared across all Docker handlers.

func NewClient added in v0.1.3

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

NewClient creates and returns a Docker Client. It initializes the underlying Docker SDK client using environment-based configuration (DOCKER_HOST, DOCKER_TLS_VERIFY, etc.) with automatic API version negotiation, then pings the daemon to verify the socket is reachable.

If the socket is unreachable the error is logged as a warning but is not fatal — handlers will return 503 for every request until the daemon becomes available. A nil *Client is never returned; the ping result only affects the startup log.

func (*Client) Close added in v0.1.3

func (c *Client) Close() error

Close releases resources held by the underlying Docker client. Call this during graceful shutdown after all in-flight requests have completed.

func (*Client) Docker added in v0.1.3

func (c *Client) Docker() *dockerclient.Client

Docker returns the underlying *dockerclient.Client for use by handlers and the Compose service initializer. Callers must not close or replace this instance.

func (*Client) Logger added in v0.1.3

func (c *Client) Logger() *zap.Logger

Logger returns the subsystem logger (component=docker). Handlers and the Compose/Swarm sub-packages use this to attach additional fields without re-constructing a logger.

type ComposeProject

type ComposeProject struct {
	Name        string `json:"name"`
	Status      string `json:"status"`
	ConfigFiles string `json:"config_files"`
}

ComposeProject is the JSON shape returned by the projects listing. We define our own struct rather than depending on docker/compose SDK types so that the handler compiles without pulling in the full compose dependency tree. The tailkit client SDK uses this same struct on the receive side.

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler added in v0.1.14

func NewHandler(cfg config.DockerConfig, client *Client, jobs *exec.JobStore, logger *zap.Logger) *Handler

NewHandler constructs a Handler for the docker integration. cfg is loaded from docker.toml at startup; client is the shared Docker SDK wrapper; jobs is the daemon-wide in-memory job store.

func (*Handler) Register added in v0.1.14

func (h *Handler) Register(mux *http.ServeMux)

Register wires all /integrations/docker/* routes onto mux.

Jump to

Keyboard shortcuts

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