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 ¶
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(ctx context.Context, 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
Click to show internal directories.
Click to hide internal directories.