diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-21 16:05:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-21 16:05:47 +0200 |
commit | 6668b131eb02797c24d96cc62e1a78b8202ec04d (patch) | |
tree | 22c0495eb3cb27b8da96fd3ea2e7646c68095330 /libpod/define/healthchecks.go | |
parent | a852afab2f37026fa8a45d115c61cd77fb3e7ef1 (diff) | |
parent | 141b34f6bec792e136c82f1e2d56e848f04d0f32 (diff) | |
download | podman-6668b131eb02797c24d96cc62e1a78b8202ec04d.tar.gz podman-6668b131eb02797c24d96cc62e1a78b8202ec04d.tar.bz2 podman-6668b131eb02797c24d96cc62e1a78b8202ec04d.zip |
Merge pull request #6304 from baude/v2remotehctests
Fix remote integration for healthchecks
Diffstat (limited to 'libpod/define/healthchecks.go')
-rw-r--r-- | libpod/define/healthchecks.go | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libpod/define/healthchecks.go b/libpod/define/healthchecks.go new file mode 100644 index 000000000..4114262b6 --- /dev/null +++ b/libpod/define/healthchecks.go @@ -0,0 +1,36 @@ +package define + +const ( + // HealthCheckHealthy describes a healthy container + HealthCheckHealthy string = "healthy" + // HealthCheckUnhealthy describes an unhealthy container + HealthCheckUnhealthy string = "unhealthy" + // HealthCheckStarting describes the time between when the container starts + // and the start-period (time allowed for the container to start and application + // to be running) expires. + HealthCheckStarting string = "starting" +) + +// HealthCheckStatus represents the current state of a container +type HealthCheckStatus int + +const ( + // HealthCheckSuccess means the health worked + HealthCheckSuccess HealthCheckStatus = iota + // HealthCheckFailure means the health ran and failed + HealthCheckFailure HealthCheckStatus = iota + // HealthCheckContainerStopped means the health check cannot + // be run because the container is stopped + HealthCheckContainerStopped HealthCheckStatus = iota + // HealthCheckContainerNotFound means the container could + // not be found in local store + HealthCheckContainerNotFound HealthCheckStatus = iota + // HealthCheckNotDefined means the container has no health + // check defined in it + HealthCheckNotDefined HealthCheckStatus = iota + // HealthCheckInternalError means some something failed obtaining or running + // a given health check + HealthCheckInternalError HealthCheckStatus = iota + // HealthCheckDefined means the healthcheck was found on the container + HealthCheckDefined HealthCheckStatus = iota +) |