From 165aef7766953cd0c0589ffa1abc25022a905adb Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Fri, 27 Mar 2020 13:21:51 -0500 Subject: podmanv2 events add the ability to monitor events Signed-off-by: Brent Baude --- pkg/domain/infra/abi/events.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pkg/domain/infra/abi/events.go (limited to 'pkg/domain/infra/abi') diff --git a/pkg/domain/infra/abi/events.go b/pkg/domain/infra/abi/events.go new file mode 100644 index 000000000..9540a5b96 --- /dev/null +++ b/pkg/domain/infra/abi/events.go @@ -0,0 +1,18 @@ +//+build ABISupport + +package abi + +import ( + "context" + + "github.com/containers/libpod/libpod/events" + "github.com/containers/libpod/pkg/domain/entities" + "github.com/sirupsen/logrus" +) + +func (ic *ContainerEngine) Events(ctx context.Context, opts entities.EventsOptions) error { + readOpts := events.ReadOptions{FromStart: opts.FromStart, Stream: opts.Stream, Filters: opts.Filter, EventChannel: opts.EventChan, Since: opts.Since, Until: opts.Until} + err := ic.Libpod.Events(readOpts) + logrus.Error(err) + return err +} -- cgit v1.2.3-54-g00ecf