status/services/check.go
2025-02-16 11:52:55 +01:00

20 lines
308 B
Go

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