task

package
v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 8 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExitStatusFromMessage

func GetExitStatusFromMessage(message string) (uint32, error)

GetExitStatusFromMessage extracts the container exit code from message.

func GetInitialHealthState

func GetInitialHealthState(taskConfig *task.TaskConfig) task.HealthState

GetInitialHealthState returns the initial health State The initial health state is UNKNOWN or DISABLED depends on health check is enabled or not

func GetSignalFromMessage

func GetSignalFromMessage(message string) (string, error)

GetSignalFromMessage extracts the container termination signal from message.

func IsSystemFailure

func IsSystemFailure(runtime *task.RuntimeInfo) bool

IsSystemFailure returns true is failure is due to a system failure like container launch failure or container terminated with signal broken pipe. System failures should be tried MaxSystemFailureAttempts irrespective of the maximum retries in the job configuration.

func RegenerateMesosTaskIDDiff

func RegenerateMesosTaskIDDiff(
	jobID *peloton.JobID,
	instanceID uint32,
	taskRuntime *task.RuntimeInfo,
	initHealthyField task.HealthState) map[string]interface{}

RegenerateMesosTaskIDDiff returns a diff for patch with the previous mesos task id set to the current mesos task id, a regenerated mesos task id, a proper initial health state, and task state set to INITIALIZED.

func RegenerateMesosTaskRuntime

func RegenerateMesosTaskRuntime(
	jobID *peloton.JobID,
	instanceID uint32,
	taskRuntime *task.RuntimeInfo,
	initHealthyField task.HealthState,
)

RegenerateMesosTaskRuntime changes the runtime to INITIALIZED state with correct initial health state and a regenerated mesos task id and the previous mesos task id set to the current value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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