states

package
v0.0.0-...-bb7034b Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidState = errors.New("invalid state given")

ErrInvalidState is the error returned when a given state does not exist in the state space for any job type.

Functions

func IsTerminal

func IsTerminal(state State) bool

IsTerminal returns true if the provided state is terminal.

Types

type State

type State string

The State type's inhabitants comprise a job's state space.

const (
	// Pending In this state, a job has been created, but its sub-resources are pending.
	Pending State = "Pending"

	// Running This is the _ready_ state for a job.
	// In this state, it is running as expected.
	Running State = "Running"

	// Completed A `Completed` job has been undeployed. `Completed` is a terminal state.
	Completed State = "Completed"

	// Failed A job is in an `Failed` state if an error has caused it to no longer be running as expected.
	Failed State = "Failed"
)

func (State) IsOneOf

func (s State) IsOneOf(targets ...State) bool

IsOneOf returns true if this state is in the supplied list.

Jump to

Keyboard shortcuts

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