observability

package
v16.11.10 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ModuleName = "observability"
)

Variables

This section is empty.

Functions

This section is empty.

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

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

type ProbeRegistry struct {
	// contains filtered or unexported fields
}

func NewProbeRegistry

func NewProbeRegistry() *ProbeRegistry

func (*ProbeRegistry) Liveness

func (p *ProbeRegistry) Liveness(ctx context.Context) error

func (*ProbeRegistry) Readiness

func (p *ProbeRegistry) Readiness(ctx context.Context) error

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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