Initial commit
This commit is contained in:
24
vendor/github.com/hyperhq/hypercli/daemon/execdriver/pipes.go
generated
vendored
Normal file
24
vendor/github.com/hyperhq/hypercli/daemon/execdriver/pipes.go
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
package execdriver
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
// Pipes is a wrapper around a container's output for
|
||||
// stdin, stdout, stderr
|
||||
type Pipes struct {
|
||||
Stdin io.ReadCloser
|
||||
Stdout, Stderr io.Writer
|
||||
}
|
||||
|
||||
// NewPipes returns a wrapper around a container's output
|
||||
func NewPipes(stdin io.ReadCloser, stdout, stderr io.Writer, useStdin bool) *Pipes {
|
||||
p := &Pipes{
|
||||
Stdout: stdout,
|
||||
Stderr: stderr,
|
||||
}
|
||||
if useStdin {
|
||||
p.Stdin = stdin
|
||||
}
|
||||
return p
|
||||
}
|
||||
Reference in New Issue
Block a user