task

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2016 License: BSD-2-Clause Imports: 1 Imported by: 9

Documentation

Index

Constants

View Source
const (
	// Unknown state of the task
	// This is the default state of a task
	// when new task is initially created
	TaskStateUnknown = "unknown"

	// Task has been received by the
	// minion and is queued for execution
	TaskStateQueued = "queued"

	// Task is being processed
	TaskStateProcessing = "processing"

	// Task has been processed by the
	// minion and was flagged as successful
	TaskStateSuccess = "success"

	// Task has been processed by the
	// minion and was flagged as failed
	TaskStateFailed = "failed"

	// Task has been skipped
	TaskStateSkipped = "skipped"
)

Task states

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	// Do not take any actions, just report what would be done
	DryRun bool `json:"dryRun"`

	// Environment to use for this task
	Environment string `json:"environment"`

	// Command to be processed
	Command string `json:"command"`

	// Time when the command was sent for processing
	TimeReceived int64 `json:"timeReceived"`

	// Time when the command was processed
	TimeProcessed int64 `json:"timeProcessed"`

	// Task unique id
	ID uuid.UUID `json:"id"`

	// Result of task after processing
	Result string `json:"result"`

	// Task state
	State string `json:"state"`
}

Task type represents a task that is processed by minions

func New

func New(command, environment string) *Task

New creates a new task

Jump to

Keyboard shortcuts

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