diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-27 15:07:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-27 15:07:32 -0400 |
commit | c64abd0b037e5918d6d24e326005ae65131dd738 (patch) | |
tree | 81a3647c98522436b35a1520d44cc2f64d707775 /pkg/domain | |
parent | ab3a620f74f2f1458054822f2113200863b60d40 (diff) | |
parent | 8438fa4fec01142ad9f6943f6e0c429c64d951b7 (diff) | |
download | podman-c64abd0b037e5918d6d24e326005ae65131dd738.tar.gz podman-c64abd0b037e5918d6d24e326005ae65131dd738.tar.bz2 podman-c64abd0b037e5918d6d24e326005ae65131dd738.zip |
Merge pull request #6407 from baude/v2eventsstream
Add streaming ability to endpoint
Diffstat (limited to 'pkg/domain')
-rw-r--r-- | pkg/domain/infra/abi/events.go | 5 | ||||
-rw-r--r-- | pkg/domain/infra/tunnel/events.go | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/pkg/domain/infra/abi/events.go b/pkg/domain/infra/abi/events.go index 20773cdce..7ec9db369 100644 --- a/pkg/domain/infra/abi/events.go +++ b/pkg/domain/infra/abi/events.go @@ -5,12 +5,9 @@ import ( "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 + return ic.Libpod.Events(readOpts) } diff --git a/pkg/domain/infra/tunnel/events.go b/pkg/domain/infra/tunnel/events.go index 93da3aeb4..6a08a1f85 100644 --- a/pkg/domain/infra/tunnel/events.go +++ b/pkg/domain/infra/tunnel/events.go @@ -25,6 +25,7 @@ func (ic *ContainerEngine) Events(ctx context.Context, opts entities.EventsOptio for e := range binChan { opts.EventChan <- entities.ConvertToLibpodEvent(e) } + close(opts.EventChan) }() - return system.Events(ic.ClientCxt, binChan, nil, &opts.Since, &opts.Until, filters) + return system.Events(ic.ClientCxt, binChan, nil, &opts.Since, &opts.Until, filters, &opts.Stream) } |