Documentation
¶
Index ¶
- Constants
- func IsHealthOK[T ~string](s T) bool
- type ProbeResponder
- func (pr *ProbeResponder) AppendHealthResponse(key, value string)
- func (pr *ProbeResponder) HealthResponse() map[string]string
- func (pr *ProbeResponder) NotLive() bool
- func (pr *ProbeResponder) NotReady() bool
- func (pr *ProbeResponder) NotStarted() bool
- func (pr *ProbeResponder) SetListener(l StatusChangeListener)
- func (pr *ProbeResponder) SetNotLive(b bool)
- func (pr *ProbeResponder) SetNotReady(b bool)
- func (pr *ProbeResponder) SetNotStarted(b bool)
- type StatusChangeListener
- type Statuskey
Constants ¶
View Source
const ( HealthOK healthstatus = "OK" HealthNotOK healthstatus = "NOT OK" )
Variables ¶
This section is empty.
Functions ¶
func IsHealthOK ¶
Types ¶
type ProbeResponder ¶
type ProbeResponder struct {
// contains filtered or unexported fields
}
ProbeStatuses are maintained primarily for K8s probe responses. Though it can be used for any prober.
func New ¶
func New() *ProbeResponder
func (*ProbeResponder) AppendHealthResponse ¶
func (pr *ProbeResponder) AppendHealthResponse(key, value string)
func (*ProbeResponder) HealthResponse ¶
func (pr *ProbeResponder) HealthResponse() map[string]string
func (*ProbeResponder) NotLive ¶
func (pr *ProbeResponder) NotLive() bool
func (*ProbeResponder) NotReady ¶
func (pr *ProbeResponder) NotReady() bool
func (*ProbeResponder) NotStarted ¶
func (pr *ProbeResponder) NotStarted() bool
func (*ProbeResponder) SetListener ¶
func (pr *ProbeResponder) SetListener(l StatusChangeListener)
SetListener is used to set a callback function which will be invoked every time any of the statuses change (e.g. liveness)
func (*ProbeResponder) SetNotLive ¶
func (pr *ProbeResponder) SetNotLive(b bool)
func (*ProbeResponder) SetNotReady ¶
func (pr *ProbeResponder) SetNotReady(b bool)
func (*ProbeResponder) SetNotStarted ¶
func (pr *ProbeResponder) SetNotStarted(b bool)
type StatusChangeListener ¶
Click to show internal directories.
Click to hide internal directories.