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.
Click to show internal directories.
Click to hide internal directories.