Documentation ¶
Index ¶
- Constants
- func NoopProbe(context.Context) error
- type MetricServer
- type Probe
- type ProbeRegistry
- func (p *ProbeRegistry) Liveness(ctx context.Context) error
- func (p *ProbeRegistry) Readiness(ctx context.Context) error
- func (p *ProbeRegistry) RegisterLivenessProbe(key string, probe Probe)
- func (p *ProbeRegistry) RegisterReadinessProbe(key string, probe Probe)
- func (p *ProbeRegistry) RegisterReadinessToggle(key string) func()
Constants ¶
View Source
const (
ModuleName = "observability"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MetricServer ¶
type MetricServer struct { Log *zap.Logger Api modshared.Api // Name is the name of the application. Name string Listener net.Listener PrometheusUrlPath string LivenessProbeUrlPath string ReadinessProbeUrlPath string Gatherer prometheus.Gatherer Registerer prometheus.Registerer ProbeRegistry *ProbeRegistry }
func (*MetricServer) ConstructHandler ¶ added in v15.6.0
func (s *MetricServer) ConstructHandler() http.Handler
type ProbeRegistry ¶ added in v15.6.0
type ProbeRegistry struct {
// contains filtered or unexported fields
}
func NewProbeRegistry ¶ added in v15.6.0
func NewProbeRegistry() *ProbeRegistry
func (*ProbeRegistry) Liveness ¶ added in v15.6.0
func (p *ProbeRegistry) Liveness(ctx context.Context) error
func (*ProbeRegistry) Readiness ¶ added in v15.6.0
func (p *ProbeRegistry) Readiness(ctx context.Context) error
func (*ProbeRegistry) RegisterLivenessProbe ¶ added in v15.6.0
func (p *ProbeRegistry) RegisterLivenessProbe(key string, probe Probe)
func (*ProbeRegistry) RegisterReadinessProbe ¶ added in v15.6.0
func (p *ProbeRegistry) RegisterReadinessProbe(key string, probe Probe)
func (*ProbeRegistry) RegisterReadinessToggle ¶ added in v15.6.0
func (p *ProbeRegistry) RegisterReadinessToggle(key string) func()
Click to show internal directories.
Click to hide internal directories.