diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2022-06-27 17:49:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-27 17:49:27 +0000 |
commit | 278afae1de55a2951b2a4810b100d14e5647977b (patch) | |
tree | 127c92338c22c1763c4564d43ba1c6eed34ac9c5 /pkg/domain/entities/events.go | |
parent | ed2afb2059744defccd40894b5f23e3803f6b3c5 (diff) | |
parent | 0c1a3b70f5f1b8a3f8d336c6576518fae26c37cf (diff) | |
download | podman-278afae1de55a2951b2a4810b100d14e5647977b.tar.gz podman-278afae1de55a2951b2a4810b100d14e5647977b.tar.bz2 podman-278afae1de55a2951b2a4810b100d14e5647977b.zip |
Merge pull request #14705 from jakecorrenti/show-health-status-event
Show Health Status events
Diffstat (limited to 'pkg/domain/entities/events.go')
-rw-r--r-- | pkg/domain/entities/events.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/domain/entities/events.go b/pkg/domain/entities/events.go index d8ba0f1d3..de218b285 100644 --- a/pkg/domain/entities/events.go +++ b/pkg/domain/entities/events.go @@ -14,6 +14,7 @@ type Event struct { // TODO: it would be nice to have full control over the types at some // point and fork such Docker types. dockerEvents.Message + HealthStatus string } // ConvertToLibpodEvent converts an entities event to a libpod one. @@ -44,6 +45,7 @@ func ConvertToLibpodEvent(e Event) *libpodEvents.Event { Status: status, Time: time.Unix(0, e.TimeNano), Type: t, + HealthStatus: e.HealthStatus, Details: libpodEvents.Details{ Attributes: details, }, @@ -59,7 +61,7 @@ func ConvertToEntitiesEvent(e libpodEvents.Event) *Event { attributes["image"] = e.Image attributes["name"] = e.Name attributes["containerExitCode"] = strconv.Itoa(e.ContainerExitCode) - return &Event{dockerEvents.Message{ + message := dockerEvents.Message{ // Compatibility with clients that still look for deprecated API elements Status: e.Status.String(), ID: e.ID, @@ -73,5 +75,9 @@ func ConvertToEntitiesEvent(e libpodEvents.Event) *Event { Scope: "local", Time: e.Time.Unix(), TimeNano: e.Time.UnixNano(), - }} + } + return &Event{ + message, + e.HealthStatus, + } } |