blob: 40172686290424c997204ec8c9a38ab8aac149cc [file] [log] [blame]
David K. Bainbridgef0da8732016-06-01 16:15:37 -07001package main
2
3type TaskStatus uint8
4
5const (
6 Pending TaskStatus = iota
7 Running
8 Complete
9 Failed
10)
11
12func (s TaskStatus) String() string {
13 switch s {
14 case Pending:
15 return "PENDING"
16 case Running:
17 return "RUNNING"
18 case Complete:
19 return "COMPLETE"
20 case Failed:
21 return "FAILED"
22 }
23 return "INVALID TASK STATUS"
24}
25
26type Task struct {
27 nodeId string
28 status TaskStatus
29}
30
31type TaskQueueEntry struct {
32 previous *TaskQueueEntry
33 next *TaskQueueEntry
34 task *Task
35}
36
37type TaskQueue struct {
38}