fsm

package
v2.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// StateInactive - no associated process
	StateInactive int64 = iota

	// StateReady - ready for job.
	StateReady

	// StateWorking - working on given payload.
	StateWorking

	// StateInvalid - indicates that WorkerProcess is being disabled and will be removed.
	StateInvalid

	// StateStopping - process is being softly stopped.
	StateStopping

	// StateKilling - process is being forcibly stopped
	StateKilling

	// StateDestroyed State of worker, when no need to allocate new one
	StateDestroyed

	// StateMaxJobsReached State of worker, when it reached executions limit
	StateMaxJobsReached

	// StateStopped - process has been terminated.
	StateStopped

	// StateErrored - error StateImpl (can't be used).
	StateErrored
)

All worker states

Variables

This section is empty.

Functions

func NewFSM

func NewFSM(initialState int64, log *zap.Logger) *fsm

NewFSM returns new FSM implementation based on initial state and callbacks to move from one state to another

Types

This section is empty.

Jump to

Keyboard shortcuts

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