From cdd5639d564624a6fbca426421d47c840dac8556 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 17 Jul 2019 15:17:26 -0400 Subject: Expose Null eventer and allow its use in the Podman CLI We need this specifically for tests, but others may find it useful if they don't explicitly need events and don't want the performance implications of using them. Signed-off-by: Matthew Heon --- libpod/events/events_linux.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libpod/events/events_linux.go') diff --git a/libpod/events/events_linux.go b/libpod/events/events_linux.go index 11f309574..ffb100be8 100644 --- a/libpod/events/events_linux.go +++ b/libpod/events/events_linux.go @@ -18,8 +18,10 @@ func NewEventer(options EventerOptions) (eventer Eventer, err error) { } case strings.ToUpper(LogFile.String()): eventer = EventLogFile{options} + case strings.ToUpper(Null.String()): + eventer = NewNullEventer() default: - return eventer, errors.Errorf("unknown event logger type: %s", strings.ToUpper(options.EventerType)) + return nil, errors.Errorf("unknown event logger type: %s", strings.ToUpper(options.EventerType)) } return eventer, nil } -- cgit v1.2.3-54-g00ecf