metrics

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: GPL-3.0 Imports: 11 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 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(mux *http.ServeMux, addr string) error
}

Handler handles incoming metrics requests

func NewMetricsHandler

func NewMetricsHandler(logger *zap.Logger, enableProf bool, healthChecker HealthCheckAgent) Handler

NewMetricsHandler creates a new instance

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