task

package
v0.0.0-...-ac6a2c4 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEmptyResourceUsageMap

func CreateEmptyResourceUsageMap() map[string]float64

CreateEmptyResourceUsageMap creates a resource usage map with usage stats initialized to 0

func CreateInitializingTask

func CreateInitializingTask(jobID *peloton.JobID, instanceID uint32, jobConfig *job.JobConfig) *task.RuntimeInfo

CreateInitializingTask for insertion into the storage layer, before being enqueued.

func CreateResourceUsageMap

func CreateResourceUsageMap(
	resourceConfig *task.ResourceConfig,
	startTimeStr, completionTimeStr string) (map[string]float64, error)

CreateResourceUsageMap creates a resource usage map with usage stats calculated as resource limit * duration

func CreateSecretProto

func CreateSecretProto(id, path string, data []byte) *peloton.Secret

CreateSecretProto creates secret proto message from secret-id, path and data

func CreateSecretsFromVolumes

func CreateSecretsFromVolumes(
	secretVolumes []*mesos_v1.Volume) []*peloton.Secret

CreateSecretsFromVolumes creates secret proto message list from the given list of secret volumes.

func CreateV1AlphaSecretProto

func CreateV1AlphaSecretProto(id, path string, data []byte) *v1alphapeloton.Secret

CreateV1AlphaSecretProto creates v1alpha secret proto message from secret-id, path and data

func EnqueueGangs

EnqueueGangs enqueues all tasks organized in gangs to respool in resmgr.

func GetDefaultPodGoalState

func GetDefaultPodGoalState(jobType job.JobType) pod.PodState

GetDefaultPodGoalState from the job type.

func GetDefaultTaskGoalState

func GetDefaultTaskGoalState(jobType job.JobType) task.TaskState

GetDefaultTaskGoalState from the job type.

func KillOrphanTask

func KillOrphanTask(
	ctx context.Context,
	lm lifecyclemgr.Manager,
	taskInfo *task.TaskInfo,
) error

KillOrphanTask kills a non-stateful Mesos task with unterminated state

Types

This section is empty.

Directories

Path Synopsis
v0
v1

Jump to

Keyboard shortcuts

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