Rename Events to task in supervisor
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
d2bf71043f
commit
3dc59d565a
18 changed files with 274 additions and 281 deletions
|
@ -6,11 +6,11 @@ import (
|
|||
"github.com/docker/containerd/runtime"
|
||||
)
|
||||
|
||||
type StartEvent struct {
|
||||
type StartTask struct {
|
||||
s *Supervisor
|
||||
}
|
||||
|
||||
func (h *StartEvent) Handle(e *Event) error {
|
||||
func (h *StartTask) Handle(e *Task) error {
|
||||
start := time.Now()
|
||||
container, err := runtime.New(h.s.stateDir, e.ID, e.BundlePath, e.Labels)
|
||||
if err != nil {
|
||||
|
@ -20,7 +20,7 @@ func (h *StartEvent) Handle(e *Event) error {
|
|||
container: container,
|
||||
}
|
||||
ContainersCounter.Inc(1)
|
||||
task := &StartTask{
|
||||
task := &startTask{
|
||||
Err: e.Err,
|
||||
Container: container,
|
||||
StartResponse: e.StartResponse,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue