sched/job/state.go
Sherif Abdel-Naby cb8f233b4d Add Documentation Comments
Signed-off-by: Sherif Abdel-Naby <sherifabdlnaby@gmail.com>
2021-04-10 12:19:32 +02:00

30 lines
548 B
Go

package job
//State Indicate the state of the Job
type State int64
const (
// NEW Job has just been created and hasn't started yet
NEW State = iota
// RUNNING Job started and is running.
RUNNING
// FINISHED Job started and finished processing.
FINISHED
// PANICKED Job started and finished but encountered a panic.
PANICKED
)
func (s State) String() string {
switch s {
case NEW:
return "NEW"
case RUNNING:
return "RUNNING"
case FINISHED:
return "FINISHED"
case PANICKED:
return "PANICKED"
default:
return "UNKNOWN"
}
}