diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-07-16 15:56:24 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-07-31 17:28:42 -0400 |
commit | 8e8d1ac1933e3891c597ea1b12e434d365b7d164 (patch) | |
tree | 2b31218bb242ed1fafcc31bc4f8e727846f2a461 /libpod/events/events.go | |
parent | 6619c073bda15ff828a49637b7330d01b7380e83 (diff) | |
download | podman-8e8d1ac1933e3891c597ea1b12e434d365b7d164.tar.gz podman-8e8d1ac1933e3891c597ea1b12e434d365b7d164.tar.bz2 podman-8e8d1ac1933e3891c597ea1b12e434d365b7d164.zip |
Add a flag to set events logger type
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/events/events.go')
-rw-r--r-- | libpod/events/events.go | 12 |
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 { |