Documentation
¶
Overview ¶
Package docker contains code for integrating with Docker.
Index ¶
- Constants
- Variables
- func ContainerListService(ctx context.Context, serviceID string) ([]types.Container, error)
- func ContainerWriteTTL(ctx context.Context, containerID string, until time.Time) error
- func EventsContainerCreate(ctx context.Context) (<-chan events.Message, <-chan error)
- func NodeDeleteServiceStateLabel(ctx context.Context, node *swarm.Node, srvName string) error
- func NodeGetServiceStateLabel(node *swarm.Node, srvName string) string
- func NodeSetServiceStateLabel(ctx context.Context, node *swarm.Node, srvName string, state string) error
- func ParallelForEachContainer(ctx context.Context, containers []types.Container, ...) (err <-chan error)
- func PrintInfo(ctx context.Context, w io.Writer) (err error)
Constants ¶
const ( // DockerSwarmServiceIDLabel key. DockerSwarmServiceIDLabel = "com.docker.swarm.service.id" // HypochronosStateLabelPattern key pattern with placeholder for the service // name. HypochronosStateLabelPattern = "de.mtneug.hypochronos.state.%s" )
Variables ¶
var ( // StdClient is the default Docker client instance. StdClient *docker.Client // Err is the error that was returned when creating the Docker client. Err error )
Functions ¶
func ContainerListService ¶
ContainerListService lists all container of a specific service.
func ContainerWriteTTL ¶
ContainerWriteTTL writes a TTL file to given container.
func EventsContainerCreate ¶
EventsContainerCreate creates a Docker events and error channel that is filtered for container creation events.
func NodeDeleteServiceStateLabel ¶
NodeDeleteServiceStateLabel removes the status label on given node for given service.
func NodeGetServiceStateLabel ¶
NodeGetServiceStateLabel extracts the value of the status label on given node for given service.
func NodeSetServiceStateLabel ¶
func NodeSetServiceStateLabel(ctx context.Context, node *swarm.Node, srvName string, state string) error
NodeSetServiceStateLabel writes a value to the status label on given node for given service.
Types ¶
This section is empty.