diff options
author | Brent Baude <bbaude@redhat.com> | 2020-04-03 14:56:10 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-04-05 15:54:51 -0500 |
commit | 4d895dcb5472da19b886ca1662182556242fe5d4 (patch) | |
tree | 13779856398cac75d3538e70d06e3a39470d1fef /libpod/define/config.go | |
parent | f7dffedeb610df662e69915fcff1bb37986baf55 (diff) | |
download | podman-4d895dcb5472da19b886ca1662182556242fe5d4.tar.gz podman-4d895dcb5472da19b886ca1662182556242fe5d4.tar.bz2 podman-4d895dcb5472da19b886ca1662182556242fe5d4.zip |
v2podman attach and exec
add the ability to attach to a running container. the tunnel side of this is not enabled yet as we have work on the endpoints and plumbing to do yet.
add the ability to exec a command in a running container. the tunnel side is also being deferred for same reason.
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/define/config.go')
-rw-r--r-- | libpod/define/config.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libpod/define/config.go b/libpod/define/config.go index 7b967f17d..10e00062a 100644 --- a/libpod/define/config.go +++ b/libpod/define/config.go @@ -1,5 +1,10 @@ package define +import ( + "bufio" + "io" +) + var ( // DefaultInfraImage to use for infra container DefaultInfraImage = "k8s.gcr.io/pause:3.2" @@ -33,3 +38,22 @@ const ( V2s2ManifestDir = "docker-dir" V2s2Archive = "docker-archive" ) + +// 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 *bufio.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 +} |