Files
podman/libpod/events/nullout.go
baude 63eef5a234 add eventlogger to info
to help with future debugging, we now display the type of event logger
being used inside podman info -> host.

Signed-off-by: baude <bbaude@redhat.com>
2019-08-02 20:05:27 -05:00

27 lines
679 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 {
return EventToNull{}
}
// String returns a string representation of the logger
func (e EventToNull) String() string {
return "none"
}