2017-09-22 09:52:41 -04:00
|
|
|
package libcontainerd
|
|
|
|
|
2017-11-29 19:15:20 -05:00
|
|
|
import "github.com/containerd/containerd/cio"
|
2017-09-22 09:52:41 -04:00
|
|
|
|
|
|
|
// Config returns the containerd.IOConfig of this pipe set
|
2017-11-29 19:15:20 -05:00
|
|
|
func (p *IOPipe) Config() cio.Config {
|
2017-09-22 09:52:41 -04:00
|
|
|
return p.config
|
|
|
|
}
|
|
|
|
|
|
|
|
// Cancel aborts ongoing operations if they have not completed yet
|
|
|
|
func (p *IOPipe) Cancel() {
|
|
|
|
p.cancel()
|
|
|
|
}
|
|
|
|
|
|
|
|
// Wait waits for io operations to finish
|
|
|
|
func (p *IOPipe) Wait() {
|
|
|
|
}
|
|
|
|
|
|
|
|
// Close closes the underlying pipes
|
|
|
|
func (p *IOPipe) Close() error {
|
|
|
|
p.cancel()
|
|
|
|
|
|
|
|
if p.Stdin != nil {
|
|
|
|
p.Stdin.Close()
|
|
|
|
}
|
|
|
|
|
|
|
|
if p.Stdout != nil {
|
|
|
|
p.Stdout.Close()
|
|
|
|
}
|
|
|
|
|
|
|
|
if p.Stderr != nil {
|
|
|
|
p.Stderr.Close()
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|