Documentation ¶
Index ¶
- Variables
- func Combine(probes ...coreprober.Prober) coreprober.Prober
- type HTTPProbe
- func (p *HTTPProbe) Healthy()
- func (p *HTTPProbe) HealthyHandler() http.HandlerFunc
- func (p *HTTPProbe) IsHealthy() bool
- func (p *HTTPProbe) IsReady() bool
- func (p *HTTPProbe) Ready()
- func (p *HTTPProbe) ReadyHandler() http.HandlerFunc
- func (p *HTTPProbe) Unhealthy(err error)
- func (p *HTTPProbe) Unready(err error)
- type InstrumentationProbe
- type Probe
- func (p *Probe) Name() string
- func (p *Probe) ReleaseResource(ctx context.Context, scope corercmgr.ResourceScopeSpan)
- func (p *Probe) ReserveResource(ctx context.Context, state *corercmgr.ScopeStat) (corercmgr.ResourceScopeSpan, error)
- func (p *Probe) Start(ctx context.Context) error
- func (p *Probe) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
var (
ProbeModularName = strings.ToLower("Probe")
)
Functions ¶
func Combine ¶
func Combine(probes ...coreprober.Prober) coreprober.Prober
Combine folds given probes into one, reflects their statuses in a thread-safe way.
Types ¶
type HTTPProbe ¶
type HTTPProbe struct {
// contains filtered or unexported fields
}
HTTPProbe represents health and readiness status of given component, and provides HTTP integration.
func NewHTTPProbe ¶
func NewHTTPProbe() *HTTPProbe
NewHTTPProbe returns HTTPProbe representing readiness and liveness of given component.
func (*HTTPProbe) Healthy ¶
func (p *HTTPProbe) Healthy()
Healthy sets components status to healthy.
func (*HTTPProbe) HealthyHandler ¶
func (p *HTTPProbe) HealthyHandler() http.HandlerFunc
HealthyHandler returns an HTTP Handler which responds health checks.
func (*HTTPProbe) ReadyHandler ¶
func (p *HTTPProbe) ReadyHandler() http.HandlerFunc
ReadyHandler returns an HTTP handler which responds readiness checks.
type InstrumentationProbe ¶
type InstrumentationProbe struct {
// contains filtered or unexported fields
}
InstrumentationProbe stores instrumentation state of Probe. This is created with an intention to combine with other Probe's using prober.Combine.
func NewInstrumentation ¶
func NewInstrumentation() *InstrumentationProbe
NewInstrumentation returns InstrumentationProbe records readiness and healthiness for given module.
func (*InstrumentationProbe) Healthy ¶
func (p *InstrumentationProbe) Healthy()
Healthy records the module status when Healthy is called, if combined with other Probes.
func (*InstrumentationProbe) Ready ¶
func (p *InstrumentationProbe) Ready()
Ready records the module status when Ready is called, if combined with other Probes.
func (*InstrumentationProbe) Unhealthy ¶
func (p *InstrumentationProbe) Unhealthy(err error)
Unhealthy records the module status when UnHealthy is called, if combined with other Probes.
func (*InstrumentationProbe) Unready ¶
func (p *InstrumentationProbe) Unready(err error)
Unready records the module status when Unready is called, if combined with other Probes.
type Probe ¶
type Probe struct {
// contains filtered or unexported fields
}
PProf is used to analyse the performance sp service
func (*Probe) ReleaseResource ¶
func (p *Probe) ReleaseResource(ctx context.Context, scope corercmgr.ResourceScopeSpan)