Documentation
¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) FetchStates(ctx context.Context, services []string) (map[string]ContainerState, error)
- func (c *Client) Logs(ctx context.Context, containerID string, lines int) (string, error)
- func (c *Client) StartCh(ctx context.Context, services []string) <-chan StateMsg
- type ContainerState
- type StateMsg
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 wraps the official Docker SDK client.
func NewClient ¶
NewClient creates a Client connected to the local Docker daemon via DOCKER_HOST / Unix socket.
func (*Client) FetchStates ¶
func (c *Client) FetchStates(ctx context.Context, services []string) (map[string]ContainerState, error)
FetchStates returns a ContainerState for each service name. Services not found in the running container list are reported as StatePending.
type ContainerState ¶
type ContainerState int
ContainerState represents the observed lifecycle state of a container.
const ( StatePending ContainerState = iota // waiting on a dependency; not yet started StateStarting // container exists, health check running StateHealthy // running and health check passing (or no healthcheck) StateUnhealthy // health check explicitly failing StateExited // stopped with non-zero exit code )
The set of observable container lifecycle states, ordered from not-yet-started to terminal.
func (ContainerState) String ¶
func (s ContainerState) String() string
type StateMsg ¶
type StateMsg struct {
States map[string]ContainerState
}
StateMsg is a Bubble Tea message emitted each poll cycle.
Click to show internal directories.
Click to hide internal directories.