open-nomad/client/allocrunnerv2/taskrunner/interfaces/lifecycle.go
2018-10-16 16:53:29 -07:00

15 lines
315 B
Go

package interfaces
import (
"context"
"os"
"github.com/hashicorp/nomad/nomad/structs"
)
type TaskLifecycle interface {
Restart(ctx context.Context, event *structs.TaskEvent, failure bool) error
Signal(event *structs.TaskEvent, s os.Signal) error
Kill(ctx context.Context, event *structs.TaskEvent) error
}