summaryrefslogtreecommitdiff
path: root/libpod/events.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-04-26 11:16:27 -0700
committerGitHub <noreply@github.com>2019-04-26 11:16:27 -0700
commite8ede74f5ef7b0d044c5d5344186fb998f676cec (patch)
tree9ee3a51fc6c94b9913da7b6097b4a4960372c766 /libpod/events.go
parenta85155617fb1ed4248adb2169845f4a08ab88789 (diff)
parente05af783295c9f4a0b210c0e6d368cf8c6dfe7c6 (diff)
downloadpodman-e8ede74f5ef7b0d044c5d5344186fb998f676cec.tar.gz
podman-e8ede74f5ef7b0d044c5d5344186fb998f676cec.tar.bz2
podman-e8ede74f5ef7b0d044c5d5344186fb998f676cec.zip
Merge pull request #3019 from mheon/system_events
Add System event type and renumber, refresh events
Diffstat (limited to 'libpod/events.go')
-rw-r--r--libpod/events.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/libpod/events.go b/libpod/events.go
index 1b5c3bd99..13bb5bdde 100644
--- a/libpod/events.go
+++ b/libpod/events.go
@@ -50,6 +50,16 @@ func (p *Pod) newPodEvent(status events.Status) {
}
}
+// newSystemEvent creates a new event for libpod as a whole.
+func (r *Runtime) newSystemEvent(status events.Status) {
+ e := events.NewEvent(status)
+ e.Type = events.System
+
+ if err := r.eventer.Write(e); err != nil {
+ logrus.Errorf("unable to write system event: %q", err)
+ }
+}
+
// newVolumeEvent creates a new event for a libpod volume
func (v *Volume) newVolumeEvent(status events.Status) {
e := events.NewEvent(status)