Add basic fifo support for IO copy

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2015-12-14 14:15:26 -08:00
parent e480aedaea
commit e9f63fc9a4
14 changed files with 141 additions and 191 deletions

View File

@@ -56,7 +56,7 @@ func NewSupervisor(id, stateDir string, tasks chan *StartTask) (*Supervisor, err
type containerInfo struct {
container runtime.Container
logger *logger
copier *copier
}
type Supervisor struct {
@@ -222,14 +222,15 @@ func (s *Supervisor) SendEvent(evt *Event) {
s.events <- evt
}
func (s *Supervisor) log(path string, i *runtime.IO) (*logger, error) {
config := &logConfig{
BundlePath: path,
func (s *Supervisor) copyIO(stdout, stderr string, i *runtime.IO) (*copier, error) {
config := &ioConfig{
Stdin: i.Stdin,
Stdout: i.Stdout,
Stderr: i.Stderr,
StdoutPath: stdout,
StderrPath: stderr,
}
l, err := newLogger(config)
l, err := newCopier(config)
if err != nil {
return nil, err
}