summaryrefslogtreecommitdiff
path: root/libpod/container_api.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-10 12:15:33 -0600
committerbaude <bbaude@redhat.com>2019-01-11 11:30:28 -0600
commit43c6da22b976b6050f86dca50564a4c2b08caee0 (patch)
treeb8cc80c9e8318ee72031c74a401567a5d5f68392 /libpod/container_api.go
parent28c35cab8750f379a418e87ed6bd874a12ec158d (diff)
downloadpodman-43c6da22b976b6050f86dca50564a4c2b08caee0.tar.gz
podman-43c6da22b976b6050f86dca50564a4c2b08caee0.tar.bz2
podman-43c6da22b976b6050f86dca50564a4c2b08caee0.zip
Add darwin support for remote-client
Add the ability to cross-compile podman remote for OSX. Also, add image exists and tag to remote-client. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r--libpod/container_api.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 4eaf737b0..149867759 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -3,6 +3,7 @@ package libpod
import (
"context"
"fmt"
+ "io"
"io/ioutil"
"os"
"strconv"
@@ -413,6 +414,25 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user, workDir
return waitErr
}
+// AttachStreams contains streams that will be attached to the container
+type AttachStreams struct {
+ // OutputStream will be attached to container's STDOUT
+ OutputStream io.WriteCloser
+ // ErrorStream will be attached to container's STDERR
+ ErrorStream io.WriteCloser
+ // InputStream will be attached to container's STDIN
+ InputStream io.Reader
+ // AttachOutput is whether to attach to STDOUT
+ // If false, stdout will not be attached
+ AttachOutput bool
+ // AttachError is whether to attach to STDERR
+ // If false, stdout will not be attached
+ AttachError bool
+ // AttachInput is whether to attach to STDIN
+ // If false, stdout will not be attached
+ AttachInput bool
+}
+
// Attach attaches to a container
func (c *Container) Attach(streams *AttachStreams, keys string, resize <-chan remotecommand.TerminalSize) error {
if !c.batched {