indicator_status

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Undefined = "UNDEFINED"

Variables

This section is empty.

Functions

func Match

func Match(thresholds []indicator.Threshold, values []float64) string

Match takes thresholds and values and determines what threshold has been breached. It returns nil if nothing was breached.

Types

type DocumentGetter

type DocumentGetter interface {
	IndicatorDocuments() ([]registry.APIV0Document, error)
}

type PromQLClient

type PromQLClient interface {
	QueryVectorValues(promql string) ([]float64, error)
}

type StatusController

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

func NewStatusController

func NewStatusController(
	dg DocumentGetter,
	su StatusUpdater,
	pc PromQLClient,
	interval time.Duration,
) *StatusController

func (StatusController) Start

func (c StatusController) Start()

type StatusUpdater

type StatusUpdater interface {
	BulkStatusUpdate(statusUpdates []registry.APIV0UpdateIndicatorStatus, documentId string) error
}

Jump to

Keyboard shortcuts

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