summaryrefslogtreecommitdiff
path: root/libpod/events
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/events')
-rw-r--r--libpod/events/events.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpod/events/events.go b/libpod/events/events.go
index 2bebff162..a898171c1 100644
--- a/libpod/events/events.go
+++ b/libpod/events/events.go
@@ -23,6 +23,18 @@ func (et EventerType) String() string {
return "journald"
}
+// IsValidEventer checks if the given string is a valid eventer type.
+func IsValidEventer(eventer string) bool {
+ switch eventer {
+ case LogFile.String():
+ return true
+ case Journald.String():
+ return true
+ default:
+ return false
+ }
+}
+
// NewEvent creates a event struct and populates with
// the given status and time.
func NewEvent(status Status) Event {