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
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
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.
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.