diff options
author | baude <bbaude@redhat.com> | 2019-03-27 13:50:54 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-04-24 16:00:04 -0500 |
commit | 7bf7c177ab3f67d5de1689842204c258fca083e4 (patch) | |
tree | 960fd1365913209fec61e3226b96a6f8bb1fd051 /libpod/events/nullout.go | |
parent | d75543fcd2ce87a9b87b8883400f355979004e91 (diff) | |
download | podman-7bf7c177ab3f67d5de1689842204c258fca083e4.tar.gz podman-7bf7c177ab3f67d5de1689842204c258fca083e4.tar.bz2 podman-7bf7c177ab3f67d5de1689842204c258fca083e4.zip |
journald event logging
add the ability for podman to read and write events to journald instead
of just a logfile. This can be controlled in libpod.conf with the
`events_logger` attribute of `journald` or `file`. The default will be
set to `journald`.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/events/nullout.go')
-rw-r--r-- | libpod/events/nullout.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libpod/events/nullout.go b/libpod/events/nullout.go new file mode 100644 index 000000000..7d811a9c7 --- /dev/null +++ b/libpod/events/nullout.go @@ -0,0 +1,23 @@ +package events + +// EventToNull is an eventer type that only performs write operations +// and only writes to /dev/null. It is meant for unittests only +type EventToNull struct{} + +// Write eats the event and always returns nil +func (e EventToNull) Write(ee Event) error { + return nil +} + +// Read does nothing. Do not use it. +func (e EventToNull) Read(options ReadOptions) error { + return nil +} + +// NewNullEventer returns a new null eventer. You should only do this for +// the purposes on internal libpod testing. +func NewNullEventer() Eventer { + var e Eventer + e = EventToNull{} + return e +} |