Initial commit
This commit is contained in:
commit
15a96783ca
12 changed files with 911 additions and 0 deletions
38
event.go
Normal file
38
event.go
Normal file
|
@ -0,0 +1,38 @@
|
|||
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 StartedEvent struct {
|
||||
ID string
|
||||
Container Container
|
||||
}
|
||||
|
||||
func (s *StartedEvent) String() string {
|
||||
return "started event"
|
||||
}
|
||||
|
||||
type CreateContainerEvent struct {
|
||||
ID string
|
||||
BundlePath string
|
||||
Err chan error
|
||||
}
|
||||
|
||||
func (c *CreateContainerEvent) String() string {
|
||||
return "create container"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue