37 lines
564 B
Go
37 lines
564 B
Go
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"
|
|
}
|
|
|
|
type StartContainerEvent struct {
|
|
ID string
|
|
BundlePath string
|
|
Err chan error
|
|
}
|
|
|
|
func (c *StartContainerEvent) String() string {
|
|
return "create container"
|
|
}
|
|
|
|
type ContainerStartErrorEvent struct {
|
|
ID string
|
|
}
|
|
|
|
func (c *ContainerStartErrorEvent) String() string {
|
|
return "container start error"
|
|
}
|