Piotr Icikowski
d33e9f19ea
- refactored types, interfaces, options etc. - added new options dedicated for `StatefulProbe`s
19 lines
440 B
Go
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
|