kubeprobes/types.go
Piotr Icikowski d33e9f19ea
refactor(kubeprobes): refactor code
- refactored types, interfaces, options etc.
- added new options dedicated for `StatefulProbe`s
2024-03-01 23:32:11 +01:00

19 lines
440 B
Go

package kubeprobes
import "net/http"
// Kubeprobes represents liveness & readiness probes handler.
type Kubeprobes interface {
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