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

internal

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 12 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