Move runtime implementation types to pkg
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
779cb69e6d
commit
c24abdde1b
8 changed files with 60 additions and 51 deletions
30
event.go
30
event.go
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue