health

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

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

func NewChecker

func NewChecker(contGetter ControllerGetter, promConfigGetter PromGlobalConfigGetter, period time.Duration, logger log.Logger, thresholdRatio float64, lc leader.Candidate) *Checker

NewChecker returns a new ready and liveness checkers based on state from the metrics controller.

func (*Checker) Alive

func (c *Checker) Alive() http.Handler

Alive returns a liveness handler.

func (*Checker) SetRunning

func (c *Checker) SetRunning()

SetRunning indicates when the process is ready.

type ControllerGetter added in v0.26.0

type ControllerGetter interface {
	GetController() *controller.Controller
}

type PromGlobalConfigGetter added in v0.24.0

type PromGlobalConfigGetter interface {
	GetGlobalConfig() promconfig.GlobalConfig
}

type Response

type Response struct {
	Code           int                       `json:"code"`
	Status         string                    `json:"status"`
	Metrics        map[string][]exportRecord `json:"metrics"`
	ExternalLabels map[string]string         `json:"external_labels"`
	Running        bool                      `json:"running"`
	Stackdump      string                    `json:"stackdump"`
}

func (*Response) MetricLogSummary

func (r *Response) MetricLogSummary(name string) (pairs []interface{})

MetricLogSummary returns a slice of pairs for the log.Logger.Log() API based on the metric name.

Jump to

Keyboard shortcuts

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