executable

package
v0.58.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2023 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DONE_TIMEOUT            = 1 * time.Second
	SIGTERM_TIMEOUT         = 2 * time.Second
	SIGINT_TIMEOUT          = 3 * time.Second
	KILL_TRANSITION_TIMEOUT = 5 * time.Second // to be on the safe side, readout might need up to 5s to go from RUNNING to DONE
	TRANSITION_TIMEOUT      = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicTask

type BasicTask struct {
	// contains filtered or unexported fields
}

func (*BasicTask) Kill

func (t *BasicTask) Kill() error

func (*BasicTask) Launch

func (t *BasicTask) Launch() error

func (*BasicTask) UnmarshalTransition

func (t *BasicTask) UnmarshalTransition(data []byte) (cmd *executorcmd.ExecutorCommand_Transition, err error)

type CommitResponse added in v0.14.3

type CommitResponse struct {
	// contains filtered or unexported fields
}

type ControllableTask

type ControllableTask struct {
	// contains filtered or unexported fields
}

func (*ControllableTask) Kill

func (t *ControllableTask) Kill() error

func (*ControllableTask) Launch

func (t *ControllableTask) Launch() error

func (*ControllableTask) UnmarshalTransition

func (t *ControllableTask) UnmarshalTransition(data []byte) (cmd *executorcmd.ExecutorCommand_Transition, err error)

type HookTask

type HookTask struct {
	// contains filtered or unexported fields
}

func (*HookTask) Kill added in v0.16.0

func (t *HookTask) Kill() error

func (*HookTask) Launch added in v0.16.0

func (t *HookTask) Launch() error

func (*HookTask) Transition added in v0.16.0

func (*HookTask) Trigger added in v0.16.0

func (t *HookTask) Trigger() error

func (*HookTask) UnmarshalTransition added in v0.16.0

func (t *HookTask) UnmarshalTransition(data []byte) (cmd *executorcmd.ExecutorCommand_Transition, err error)

type SendDeviceEventFunc

type SendDeviceEventFunc func(envId uid.ID, event event.DeviceEvent)

type SendMessageFunc added in v0.14.91

type SendMessageFunc func(message []byte)

type SendStatusFunc

type SendStatusFunc func(envId uid.ID, state mesos.TaskState, message string)

type Task

type Task interface {
	Launch() error
	Kill() error
	Transition(transition *executorcmd.ExecutorCommand_Transition) *controlcommands.MesosCommandResponse_Transition
	UnmarshalTransition([]byte) (*executorcmd.ExecutorCommand_Transition, error)
}

func NewTask

func NewTask(taskInfo mesos.TaskInfo, sendStatusFunc SendStatusFunc, sendDeviceEventFunc SendDeviceEventFunc, sendMessageFunc SendMessageFunc) Task

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL