summaryrefslogtreecommitdiff
path: root/libpod/events/events.go
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2019-04-25 16:23:09 -0400
committerMatthew Heon <mheon@redhat.com>2019-04-25 16:23:09 -0400
commit04d6ff058270006b98961e0f973ff6ee4c3ba8e8 (patch)
treea929615470ee8c220f95512f194054d145656be7 /libpod/events/events.go
parenta01c62fcbde1afdc77aa05b71c3c84ddacf7fc55 (diff)
downloadpodman-04d6ff058270006b98961e0f973ff6ee4c3ba8e8.tar.gz
podman-04d6ff058270006b98961e0f973ff6ee4c3ba8e8.tar.bz2
podman-04d6ff058270006b98961e0f973ff6ee4c3ba8e8.zip
Add System event type and renumber, refresh events
Also, re-add locking to file eventer Write() to protect against concurrent events. Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/events/events.go')
-rw-r--r--libpod/events/events.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/libpod/events/events.go b/libpod/events/events.go
index e8c61faa0..533eccbb8 100644
--- a/libpod/events/events.go
+++ b/libpod/events/events.go
@@ -49,6 +49,8 @@ func (e *Event) ToHumanReadable() string {
humanFormat = fmt.Sprintf("%s %s %s %s (image=%s, name=%s)", e.Time, e.Type, e.Status, e.ID, e.Image, e.Name)
case Image:
humanFormat = fmt.Sprintf("%s %s %s %s %s", e.Time, e.Type, e.Status, e.ID, e.Name)
+ case System:
+ humanFormat = fmt.Sprintf("%s %s %s", e.Time, e.Type, e.Status)
case Volume:
humanFormat = fmt.Sprintf("%s %s %s %s", e.Time, e.Type, e.Status, e.Name)
}
@@ -85,6 +87,8 @@ func StringToType(name string) (Type, error) {
return Image, nil
case Pod.String():
return Pod, nil
+ case System.String():
+ return System, nil
case Volume.String():
return Volume, nil
}
@@ -135,8 +139,14 @@ func StringToStatus(name string) (Status, error) {
return Pull, nil
case Push.String():
return Push, nil
+ case Refresh.String():
+ return Refresh, nil
case Remove.String():
return Remove, nil
+ case Renumber.String():
+ return Renumber, nil
+ case Restore.String():
+ return Restore, nil
case Save.String():
return Save, nil
case Start.String():