metrics

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessAgents

func ProcessAgents(agents []HealthCheckAgent) []string

ProcessAgents takes a slice of HealthCheckAgent, and invokes them

func ReportSSVNodeHealthiness added in v0.4.7

func ReportSSVNodeHealthiness(healthy bool)

ReportSSVNodeHealthiness reports SSV node healthiness.

func WaitUntilHealthy

func WaitUntilHealthy(logger *zap.Logger, component interface{}, name string)

WaitUntilHealthy takes some component (that implements HealthCheckAgent) and wait until it is healthy

Types

type Handler

type Handler interface {
	// Start starts an http server, listening to /metrics requests
	Start(logger *zap.Logger, mux *http.ServeMux, addr string) error
}

Handler handles incoming metrics requests

func NewMetricsHandler

func NewMetricsHandler(ctx context.Context, db basedb.IDb, enableProf bool, healthChecker HealthCheckAgent) Handler

NewMetricsHandler returns a new metrics handler.

type HealthCheckAgent

type HealthCheckAgent interface {
	HealthCheck() []string
}

HealthCheckAgent represent an health-check agent

Jump to

Keyboard shortcuts

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