From 8ffeb626c918b9b9329a8bda5e5579169e323bdf Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Thu, 11 Aug 2022 11:19:40 +0100 Subject: events: Add freebsd support for libpod/event [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson --- libpod/events/events_freebsd.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 libpod/events/events_freebsd.go (limited to 'libpod/events/events_freebsd.go') diff --git a/libpod/events/events_freebsd.go b/libpod/events/events_freebsd.go new file mode 100644 index 000000000..17d410089 --- /dev/null +++ b/libpod/events/events_freebsd.go @@ -0,0 +1,23 @@ +package events + +import ( + "fmt" + "strings" + + "github.com/sirupsen/logrus" +) + +// NewEventer creates an eventer based on the eventer type +func NewEventer(options EventerOptions) (Eventer, error) { + logrus.Debugf("Initializing event backend %s", options.EventerType) + switch strings.ToUpper(options.EventerType) { + case strings.ToUpper(LogFile.String()): + return EventLogFile{options}, nil + case strings.ToUpper(Null.String()): + return NewNullEventer(), nil + case strings.ToUpper(Memory.String()): + return NewMemoryEventer(), nil + default: + return nil, fmt.Errorf("unknown event logger type: %s", strings.ToUpper(options.EventerType)) + } +} -- cgit v1.2.3-54-g00ecf