mirror of
https://github.com/containers/podman.git
synced 2025-06-26 12:56:45 +08:00

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>
24 lines
588 B
Go
24 lines
588 B
Go
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
|
|
}
|