summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-23 11:34:42 -0400
committerGitHub <noreply@github.com>2021-09-23 11:34:42 -0400
commite8fc990aadf438e3b138d77b1bb4500cc60a7738 (patch)
tree641a8b9e92c3a986d38a42068cc092af6b72a736 /libpod/define
parentc2beea695857b71250c87eb9ab799f7773b8d251 (diff)
parent1199733754b1185d0d2a7a3d832c57565864d0f4 (diff)
downloadpodman-e8fc990aadf438e3b138d77b1bb4500cc60a7738.tar.gz
podman-e8fc990aadf438e3b138d77b1bb4500cc60a7738.tar.bz2
podman-e8fc990aadf438e3b138d77b1bb4500cc60a7738.zip
Merge pull request #11654 from Luap99/health-docker
podman inspect add State.Health field for docker compat
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/container_inspect.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/libpod/define/container_inspect.go b/libpod/define/container_inspect.go
index 90703a807..7decb18a8 100644
--- a/libpod/define/container_inspect.go
+++ b/libpod/define/container_inspect.go
@@ -202,10 +202,16 @@ type InspectContainerState struct {
Error string `json:"Error"` // TODO
StartedAt time.Time `json:"StartedAt"`
FinishedAt time.Time `json:"FinishedAt"`
- Healthcheck HealthCheckResults `json:"Healthcheck,omitempty"`
+ Health HealthCheckResults `json:"Health,omitempty"`
Checkpointed bool `json:"Checkpointed,omitempty"`
}
+// Healthcheck returns the HealthCheckResults. This is used for old podman compat
+// to make the "Healthcheck" key available in the go template.
+func (s *InspectContainerState) Healthcheck() HealthCheckResults {
+ return s.Health
+}
+
// HealthCheckResults describes the results/logs from a healthcheck
type HealthCheckResults struct {
// Status healthy or unhealthy