observability

package
v15.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "observability"
)

Variables

This section is empty.

Functions

func NoopProbe

func NoopProbe(context.Context) error

NoopProbe is a placeholder probe for convenience

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

func (*MetricServer) Run

func (s *MetricServer) Run(ctx context.Context) error

type Probe

type Probe func(context.Context) error

Probe is the expected type for probe functions

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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL