Documentation ¶
Index ¶
- type ContainerAdaptor
- type State
- type Watcher
- func (w *Watcher) HandleDelete(filter string, handler func(containerd.Container, *_events.TaskDelete)) error
- func (w *Watcher) HandleExit(filter string, handler func(containerd.Container, *_events.TaskExit)) error
- func (w *Watcher) HandleStart(filter string, handler func(containerd.Container, *_events.TaskStart)) error
- func (w *Watcher) Listen(ctxw context.Context)
- func (w *Watcher) Version() (containerd.Version, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerAdaptor ¶
type ContainerAdaptor struct {
// contains filtered or unexported fields
}
ContainerAdaptor is an Adaptator for ContainerJSON
func NewContainerAdaptor ¶
func NewContainerAdaptor(container containerd.Container) *ContainerAdaptor
NewContainerAdaptor return an Adaptator
type State ¶
type State struct {
// contains filtered or unexported fields
}
State manage containers as a CRUD
func (*State) HandleCreate ¶
func (s *State) HandleCreate(filter string, handler func(containerd.Container)) error
HandleCreate handles create events
func (*State) HandleDelete ¶
func (s *State) HandleDelete(filter string, handler func(containerd.Container)) error
HandleDelete handles delete events
type Watcher ¶
type Watcher struct { Container *containerd.Client // contains filtered or unexported fields }
Watcher watch the watchmen Watch Containerd for container events
func (*Watcher) HandleDelete ¶
func (w *Watcher) HandleDelete(filter string, handler func(containerd.Container, *_events.TaskDelete)) error
HandleDelete handles delete
func (*Watcher) HandleExit ¶
func (w *Watcher) HandleExit(filter string, handler func(containerd.Container, *_events.TaskExit)) error
HandleExit handles exit
func (*Watcher) HandleStart ¶
func (w *Watcher) HandleStart(filter string, handler func(containerd.Container, *_events.TaskStart)) error
HandleStart handles start
Click to show internal directories.
Click to hide internal directories.