Files
mq/dag/v1/consts.go
2024-11-23 10:51:22 +05:45

27 lines
387 B
Go

package v1
type NodeStatus int
func (c NodeStatus) IsValid() bool { return c >= Pending && c <= Failed }
func (c NodeStatus) String() string {
switch c {
case Pending:
return "Pending"
case Processing:
return "Processing"
case Completed:
return "Completed"
case Failed:
return "Failed"
}
return ""
}
const (
Pending NodeStatus = iota
Processing
Completed
Failed
)