status/services/check.go

21 lines
308 B
Go
Raw Normal View History

2025-02-16 10:52:55 +00:00
package services
import "encoding/json"
type Status int
const (
StatusUnknown Status = 0
StatusUp Status = 1
StatusDown Status = 2
)
var Factories = map[string]Factory{
"ping": Ping,
"tcp_dial": TCPDial,
}
type Factory func(msg json.RawMessage) (Check, error)
type Check func() Status