aboutsummaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/util.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-09-14 13:46:59 -0700
committerJhon Honce <jhonce@redhat.com>2020-09-14 13:46:59 -0700
commit146c68f3acdc01f393a6cfadf9bc98eec3e8de94 (patch)
tree4e6017e6b64d8fef0c2acb6cd0a3f13545f33b8f /pkg/varlinkapi/util.go
parentfd7cdb25027bb33c33eacb99f1a02838eca5d684 (diff)
downloadpodman-146c68f3acdc01f393a6cfadf9bc98eec3e8de94.tar.gz
podman-146c68f3acdc01f393a6cfadf9bc98eec3e8de94.tar.bz2
podman-146c68f3acdc01f393a6cfadf9bc98eec3e8de94.zip
Refactor API build endpoint to be more compliant
* Refactor/Rename channel.WriteCloser() to encapsulate the channel * Refactor build endpoint to "live" stream buildah output channels over API rather then buffering output * Refactor bindings/tunnel build because endpoint changes * building tar file now in bindings rather then depending on caller * Cleanup initiating extra image engine * Remove setting fields to zero values (less noise in code) * Update tests to support remote builds Fixes #7136 Fixes #7137 Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/varlinkapi/util.go')
-rw-r--r--pkg/varlinkapi/util.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/varlinkapi/util.go b/pkg/varlinkapi/util.go
index 748d8f9cc..7f96965f0 100644
--- a/pkg/varlinkapi/util.go
+++ b/pkg/varlinkapi/util.go
@@ -11,7 +11,7 @@ import (
"github.com/containers/buildah"
"github.com/containers/podman/v2/libpod"
"github.com/containers/podman/v2/libpod/define"
- "github.com/containers/podman/v2/pkg/channelwriter"
+ "github.com/containers/podman/v2/pkg/channel"
iopodman "github.com/containers/podman/v2/pkg/varlink"
"github.com/containers/storage/pkg/archive"
)
@@ -201,7 +201,7 @@ func makePsOpts(inOpts iopodman.PsOpts) PsOptions {
// more. it is capable of sending updates as the output writer gets them or append them
// all to a log. the chan error is the error from the libpod call so we can honor
// and error event in that case.
-func forwardOutput(log []string, c chan error, wantsMore bool, output *channelwriter.Writer, reply func(br iopodman.MoreResponse) error) ([]string, error) {
+func forwardOutput(log []string, c chan error, wantsMore bool, output channel.WriteCloser, reply func(br iopodman.MoreResponse) error) ([]string, error) {
done := false
for {
select {
@@ -214,7 +214,7 @@ func forwardOutput(log []string, c chan error, wantsMore bool, output *channelwr
done = true
// if no error is found, we pull what we can from the log writer and
// append it to log string slice
- case line := <-output.ByteChannel:
+ case line := <-output.Chan():
log = append(log, string(line))
// If the end point is being used in more mode, send what we have
if wantsMore {