summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r--pkg/varlinkapi/images.go6
-rw-r--r--pkg/varlinkapi/util.go6
2 files changed, 6 insertions, 6 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index 1dcfa2213..4bcf70b0d 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -23,7 +23,7 @@ import (
"github.com/containers/podman/v2/libpod"
"github.com/containers/podman/v2/libpod/define"
"github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/pkg/channelwriter"
+ "github.com/containers/podman/v2/pkg/channel"
"github.com/containers/podman/v2/pkg/util"
iopodman "github.com/containers/podman/v2/pkg/varlink"
"github.com/containers/podman/v2/utils"
@@ -570,7 +570,7 @@ func (i *VarlinkAPI) Commit(call iopodman.VarlinkCall, name, imageName string, c
log []string
mimeType string
)
- output := channelwriter.NewChannelWriter()
+ output := channel.NewWriter(make(chan []byte))
channelClose := func() {
if err := output.Close(); err != nil {
logrus.Errorf("failed to close channel writer: %q", err)
@@ -704,7 +704,7 @@ func (i *VarlinkAPI) PullImage(call iopodman.VarlinkCall, name string, creds iop
if call.WantsMore() {
call.Continues = true
}
- output := channelwriter.NewChannelWriter()
+ output := channel.NewWriter(make(chan []byte))
channelClose := func() {
if err := output.Close(); err != nil {
logrus.Errorf("failed to close channel writer: %q", err)
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 {