cfha/core/transition.go

27 lines
354 B
Go
Raw Permalink Normal View History

2015-08-23 03:20:58 +00:00
package core
2015-08-21 17:27:26 +00:00
type Status int
const (
Unknown Status = iota
Up Status = iota
Down Status = iota
)
func (t Status) String() string {
if t == Unknown {
return "Unknown"
} else if t == Up {
return "Up"
} else if t == Down {
return "Down"
}
return ""
}
type Transition struct {
To Status
From Status
RecordValue string
}