From 2bdf7fafa73cabf7cf63657a6b58f2a423ae0fcd Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Tue, 2 Feb 2021 19:17:03 +0300 Subject: Move worker states out of internal --- pkg/states/worker_states.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pkg/states/worker_states.go (limited to 'pkg/states/worker_states.go') diff --git a/pkg/states/worker_states.go b/pkg/states/worker_states.go new file mode 100644 index 00000000..22fdfe8a --- /dev/null +++ b/pkg/states/worker_states.go @@ -0,0 +1,31 @@ +package states + +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 + + // State of worker, when no need to allocate new one + StateDestroyed + + // StateStopped - process has been terminated. + StateStopped + + // StateErrored - error WorkerState (can't be used). + StateErrored + + StateRemove +) -- cgit v1.2.3