internal

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: Apache-2.0 Imports: 11 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
}

API provides an HTTP API singleton for handling http endpoints in the rule evaluator.

func NewAPI

func NewAPI(logger log.Logger, rulesManager RuleRetriever) *API

NewAPI creates a new API instance.

func (*API) HandleAlertsEndpoint

func (api *API) HandleAlertsEndpoint(w http.ResponseWriter, _ *http.Request)

func (*API) HandleRulesEndpoint

func (api *API) HandleRulesEndpoint(w http.ResponseWriter, r *http.Request)

type RuleRetriever

type RuleRetriever interface {
	RuleGroups() []*rules.Group
	AlertingRules() []*rules.AlertingRule
}

RuleRetriever provides a list of active rules.

Jump to

Keyboard shortcuts

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