github.com/AbhinandanKurakure/podman/v3@v3.4.10/libpod/events/nullout.go (about) 1 package events 2 3 import ( 4 "context" 5 ) 6 7 // EventToNull is an eventer type that only performs write operations 8 // and only writes to /dev/null. It is meant for unittests only 9 type EventToNull struct{} 10 11 // Write eats the event and always returns nil 12 func (e EventToNull) Write(ee Event) error { 13 return nil 14 } 15 16 // Read does nothing. Do not use it. 17 func (e EventToNull) Read(ctx context.Context, options ReadOptions) error { 18 return nil 19 } 20 21 // NewNullEventer returns a new null eventer. You should only do this for 22 // the purposes on internal libpod testing. 23 func NewNullEventer() Eventer { 24 return EventToNull{} 25 } 26 27 // String returns a string representation of the logger 28 func (e EventToNull) String() string { 29 return "none" 30 }