Move runtime implementation types to pkg

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2015-12-01 11:56:08 -08:00
parent 779cb69e6d
commit c24abdde1b
8 changed files with 60 additions and 51 deletions

View file

@ -4,6 +4,7 @@ import (
"os"
"time"
"github.com/docker/containerd/runtime"
"github.com/opencontainers/specs"
)
@ -27,24 +28,19 @@ func NewEvent(t EventType) *Event {
}
}
type Stdio struct {
Stderr string `json:"stderr,omitempty"`
Stdout string `json:"stdout,omitempty"`
}
type Event struct {
Type EventType `json:"type"`
Timestamp time.Time `json:"timestamp"`
ID string `json:"id,omitempty"`
BundlePath string `json:"bundlePath,omitempty"`
Stdio *Stdio `json:"stdio,omitempty"`
Pid int `json:"pid,omitempty"`
Status int `json:"status,omitempty"`
Signal os.Signal `json:"signal,omitempty"`
Process *specs.Process `json:"process,omitempty"`
State *State `json:"state,omitempty"`
Containers []Container `json:"-"`
Err chan error `json:"-"`
Type EventType `json:"type"`
Timestamp time.Time `json:"timestamp"`
ID string `json:"id,omitempty"`
BundlePath string `json:"bundlePath,omitempty"`
Stdio *runtime.Stdio `json:"stdio,omitempty"`
Pid int `json:"pid,omitempty"`
Status int `json:"status,omitempty"`
Signal os.Signal `json:"signal,omitempty"`
Process *specs.Process `json:"process,omitempty"`
State *runtime.State `json:"state,omitempty"`
Containers []runtime.Container `json:"-"`
Err chan error `json:"-"`
}
type Handler interface {