mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
21 lines
376 B
Go
21 lines
376 B
Go
package keel
|
|
|
|
import (
|
|
"github.com/foomo/keel/healthz"
|
|
"github.com/foomo/keel/interfaces"
|
|
)
|
|
|
|
func IsHealthz(v any) bool {
|
|
switch v.(type) {
|
|
case healthz.BoolHealthzer,
|
|
healthz.BoolHealthzerWithContext,
|
|
healthz.ErrorHealthzer,
|
|
healthz.ErrorHealthzWithContext,
|
|
interfaces.ErrorPinger,
|
|
interfaces.ErrorPingerWithContext:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|