mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 07:21:26 +02:00
improved metrics implementation
This commit is contained in:
@@ -13,6 +13,7 @@ const (
|
||||
NumStatuses int = iota - 1
|
||||
|
||||
HealthyMask = StatusHealthy | StatusNapping | StatusStarting
|
||||
IdlingMask = StatusNapping | StatusStarting
|
||||
)
|
||||
|
||||
func (s Status) String() string {
|
||||
@@ -43,3 +44,7 @@ func (s Status) Good() bool {
|
||||
func (s Status) Bad() bool {
|
||||
return s&HealthyMask == 0
|
||||
}
|
||||
|
||||
func (s Status) Idling() bool {
|
||||
return s&IdlingMask != 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user