Documentation ¶
Index ¶
Constants ¶
const CheckCleanupLabel string = "mon.checks.cleanup=1"
CheckCleanupLabel is how we detect containers we want to remove if they exit cleanly
const CheckHealthLabel string = "mon.checks.health=1"
CheckHealthLabel is how we detect containers we want to restart based on health
const CleanupExitCodeLabelKey string = "mon.checks.cleanup.code"
CleanupExitCodeLabelKey is the label key in which the expected exit code can be overriden
const DefaultCleanupExitCode int = 0
DefaultCleanupExitCode is the default exit code we expect for cleanup
const DefaultRestartTimeoutMs int64 = 10 * 1000
DefaultRestartTimeoutMs is the default timeout for restarting
const ExitedState string = "exited"
ExitedState is the literal "exited"
const HealthRestartLabelKey string = "mon.checks.health.timeout"
HealthRestartLabelKey is the label key in which the expected restart timeout can be overriden
const ObserveLabel string = "mon.observe=1"
ObserveLabel is how we detect containers we want to monitor
const RunningState string = "running"
RunningState is the literal "running"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerAPI ¶
type DockerAPI interface { ExecuteListQuery(filterList []string) ([]types.Container, error) Restart(timeoutMs int64, cont types.Container) error Remove(types.Container) error Inspect(cont types.Container) (types.ContainerJSON, error) }
DockerAPI is something that implements the docker API
type DockerD ¶
DockerD implements the DockerAPI for the docker daemon
func (*DockerD) ExecuteListQuery ¶
ExecuteListQuery to find containers
type PollHandler ¶
PollHandler provides a poll method
type Poller ¶
type Poller struct { IntervalMs int64 Handler PollHandler // contains filtered or unexported fields }
Poller polls the docker socket at an interval, to find containers