mirror of
https://github.com/containers/podman.git
synced 2025-10-24 15:03:45 +08:00
This function changed from public to private which broke the FreeBSD build. Sadly, adding FreeBSD to the cross build isn't currently possible since github.com/godbus/dbus relies on cgo on FreeBSD. I've tried to fix this upstream but my PR is going nowhere - I think this dependency is only needed for systemd which isn't a thing on FreeBSD so it might be possible to work around the problem in libpod by making the systemd code conditional on linux. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
24 lines
641 B
Go
24 lines
641 B
Go
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))
|
|
}
|
|
}
|