sched/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

38 lines
732 B
Go

package sched
//State Indicate the state of the Schedule
type State int64
const (
//NEW Schedule has just been created and hasn't started before
NEW State = iota
// STARTED Start Schedule has started and is running.
STARTED
// STOPPING Schedule is Stopping and is waiting for all active jobs to finish.
STOPPING
// STOPPED Schedule has stopped and no longer scheduling new Jobs.
STOPPED
// FINISHED Schedule has finished, and will not be able to start again.
FINISHED
)
func (s State) String() string {
switch s {
case NEW:
return "NEW"
case STARTED:
return "STARTED"
case STOPPING:
return "STOPPING"
case STOPPED:
return "STOPPED"
case FINISHED:
return "FINISHED"
default:
return "UNKNOWN"
}
}