Documentation
¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) GetContainer(ctx context.Context, containerID string) (*client.ContainerInspectResult, error)
- func (c *Client) GetContainerLogs(ctx context.Context, containerID string) (string, error)
- func (c *Client) GetHealthStatus(ctx context.Context, containerNameOrID string) (string, error)
- func (c *Client) HasHealthCheck(ctx context.Context, containerNameOrID string) (bool, error)
- func (c *Client) IsContainerRunning(ctx context.Context, containerNameOrID string) (bool, error)
- func (c *Client) ListManagedContainers(ctx context.Context) ([]container.Summary, error)
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) StartContainer(ctx context.Context, containerID string) error
- func (c *Client) StopContainer(ctx context.Context, containerID string, timeout int) error
- type ContainerLabels
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 Docker client with custom methods
func (*Client) GetContainer ¶
func (c *Client) GetContainer(ctx context.Context, containerID string) (*client.ContainerInspectResult, error)
GetContainer returns detailed container information
func (*Client) GetContainerLogs ¶
GetContainerLogs retrieves container logs
func (*Client) GetHealthStatus ¶
GetHealthStatus returns the health status of a container Returns: "healthy", "unhealthy", "starting", "none"
func (*Client) HasHealthCheck ¶
HasHealthCheck checks if a container has a health check configured
func (*Client) IsContainerRunning ¶
IsContainerRunning checks if a container is currently running
func (*Client) ListManagedContainers ¶
ListManagedContainers returns all containers with saltbox_managed=true label
func (*Client) StartContainer ¶
StartContainer starts a container by name or ID
type ContainerLabels ¶
type ContainerLabels struct {
Managed bool
DependsOn []string
DependsOnDelay int
DependsOnHealthchecks bool
ControllerEnabled bool
}
ContainerLabels represents parsed Saltbox labels
func ParseLabels ¶
func ParseLabels(labels map[string]string) *ContainerLabels
ParseLabels extracts and parses Saltbox-specific labels from a container
func (*ContainerLabels) GetDependencies ¶
func (l *ContainerLabels) GetDependencies() []string
GetDependencies returns the list of container names this container depends on
func (*ContainerLabels) GetStartupDelay ¶
func (l *ContainerLabels) GetStartupDelay() int
GetStartupDelay returns the startup delay in seconds
func (*ContainerLabels) HasDependencies ¶
func (l *ContainerLabels) HasDependencies() bool
HasDependencies returns true if the container has any dependencies
func (*ContainerLabels) IsManaged ¶
func (l *ContainerLabels) IsManaged() bool
IsManaged returns true if the container should be managed by the controller
func (*ContainerLabels) ShouldWaitForHealthcheck ¶
func (l *ContainerLabels) ShouldWaitForHealthcheck() bool
ShouldWaitForHealthcheck returns true if we should wait for health checks