containerd/event.go

47 lines
722 B
Go
Raw Normal View History

2015-11-05 23:29:53 +00:00
package containerd
type Event interface {
String() string
}
type CallbackEvent interface {
Event() Event
Callback() chan Event
}
type ExitEvent struct {
Pid int
Status int
}
func (e *ExitEvent) String() string {
return "exit event"
}
2015-11-06 23:42:32 +00:00
type StartContainerEvent struct {
2015-11-05 23:29:53 +00:00
ID string
BundlePath string
Err chan error
}
2015-11-06 23:42:32 +00:00
func (c *StartContainerEvent) String() string {
2015-11-05 23:29:53 +00:00
return "create container"
}
2015-11-07 00:44:52 +00:00
type ContainerStartErrorEvent struct {
ID string
}
func (c *ContainerStartErrorEvent) String() string {
return "container start error"
}
2015-11-10 19:38:26 +00:00
type GetContainersEvent struct {
Containers []Container
Err chan error
}
func (c *GetContainersEvent) String() string {
return "get containers"
}