kubeprobes/types.go

24 lines
636 B
Go

package kubeprobes
import "net/http"
// Kubeprobes represents liveness & readiness probes handler.
type Kubeprobes interface {
http.Handler
// LivenessHandler returns [http.Handler] for liveness probes.
LivenessHandler() http.Handler
// ReadinessHandler returns [http.Handler] for readiness probes.
ReadinessHandler() http.Handler
}
// Option represents a [Kubeprobes] constructor option.
type Option interface {
apply(kp *kubeprobes)
}
// ProbeFunction is a function that determines whether
// the given metric may be marked as correctly functioning.
// It not, the error should be returned.
type ProbeFunction func() error