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 ¶
func (s *MetricServer) ConstructHandler() http.Handler
type ProbeRegistry ¶
type ProbeRegistry struct {
// contains filtered or unexported fields
}
func NewProbeRegistry ¶
func NewProbeRegistry() *ProbeRegistry
func (*ProbeRegistry) RegisterLivenessProbe ¶
func (p *ProbeRegistry) RegisterLivenessProbe(key string, probe Probe)
func (*ProbeRegistry) RegisterReadinessProbe ¶
func (p *ProbeRegistry) RegisterReadinessProbe(key string, probe Probe)
func (*ProbeRegistry) RegisterReadinessToggle ¶
func (p *ProbeRegistry) RegisterReadinessToggle(key string) func()
Click to show internal directories.
Click to hide internal directories.