Add null io option
This adds null IO option for efficient handling of IO. It provides a container directly with `/dev/null` and does not require any io.Copy within the shim whenever a user does not want the IO of the container. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
5
io.go
5
io.go
@@ -126,6 +126,11 @@ func StdioTerminal(id string) (*IO, error) {
|
||||
return NewIOWithTerminal(os.Stdin, os.Stdout, os.Stderr, true)(id)
|
||||
}
|
||||
|
||||
// NullIO redirects the container's IO into /dev/null
|
||||
func NullIO(id string) (*IO, error) {
|
||||
return &IO{}, nil
|
||||
}
|
||||
|
||||
// FIFOSet is a set of fifos for use with tasks
|
||||
type FIFOSet struct {
|
||||
// Dir is the directory holding the task fifos
|
||||
|
||||
Reference in New Issue
Block a user