Help us shape the future of Go! Take the 2026 Go Developer Survey

v1

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(
	logger log.Logger,
	ruleRetriever RulesRetriever,
) *API

func (*API) Register

func (api *API) Register(r *route.Router, tracer opentracing.Tracer, logger log.Logger, ins extpromhttp.InstrumentationMiddleware)

type Alert

type Alert struct {
	Labels                  labels.Labels `json:"labels"`
	Annotations             labels.Labels `json:"annotations"`
	State                   string        `json:"state"`
	ActiveAt                *time.Time    `json:"activeAt,omitempty"`
	Value                   float64       `json:"value"`
	PartialResponseStrategy string        `json:"partial_response_strategy"`
}

type AlertDiscovery

type AlertDiscovery struct {
	Alerts []*Alert `json:"alerts"`
}

type RuleDiscovery

type RuleDiscovery struct {
	RuleGroups []*RuleGroup `json:"groups"`
}

type RuleGroup

type RuleGroup struct {
	Name string `json:"name"`
	File string `json:"file"`
	// In order to preserve rule ordering, while exposing type (alerting or recording)
	// specific properties, both alerting and recording rules are exposed in the
	// same array.
	Rules                   []rule  `json:"rules"`
	Interval                float64 `json:"interval"`
	PartialResponseStrategy string  `json:"partial_response_strategy"`
}

type RulesRetriever added in v0.4.0

type RulesRetriever interface {
	RuleGroups() []thanosrule.Group
	AlertingRules() []thanosrule.AlertingRule
}

Jump to

Keyboard shortcuts

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