Versions in this module Expand all Collapse all v0 v0.0.310 Jun 15, 2022 Changes in this version + const ErrBadData + const ErrDuplicateName + const ErrNotFound + const ErrServer + const ResultCreated + const ResultDeleted + const ResultUpdated + const StatusError + const StatusSuccess + var ErrAlertingAPIV2NotEnabled = errors.New("The alerting v2 API is not enabled") + var ErrAlertingRuleAlreadyExists = errors.New("The alerting rule already exists") + var ErrAlertingRuleNotFound = errors.New("The alerting rule was not found") + var ErrThanosRulerNotEnabled = errors.New(...) + func AlertingRuleIdCompare(leftId, rightId string) bool + type Alert struct + ActiveAt *time.Time + Annotations map[string]string + Labels map[string]string + RuleId string + RuleName string + State string + Value string + type AlertList struct + Items []*Alert + Total int + type AlertQueryParams struct + LabelContainFilters map[string]string + LabelEqualFilters map[string]string + Limit int + PageNum int + State string + func ParseAlertQueryParams(req *restful.Request) (*AlertQueryParams, error) + func (q *AlertQueryParams) Filter(alerts []*Alert) []*Alert + func (q *AlertQueryParams) Sort(alerts []*Alert) + func (q *AlertQueryParams) Sub(alerts []*Alert) []*Alert + type AlertingRule struct + Annotations map[string]string + Duration string + Id string + Labels map[string]string + Name string + Query string + type AlertingRuleQueryParams struct + Health string + LabelContainFilters map[string]string + LabelEqualFilters map[string]string + Limit int + NameContainFilter string + PageNum int + SortField string + SortType string + State string + func ParseAlertingRuleQueryParams(req *restful.Request) (*AlertingRuleQueryParams, error) + func (q *AlertingRuleQueryParams) Filter(rules []*GettableAlertingRule) []*GettableAlertingRule + func (q *AlertingRuleQueryParams) Sort(rules []*GettableAlertingRule) + func (q *AlertingRuleQueryParams) Sub(rules []*GettableAlertingRule) []*GettableAlertingRule + type BulkItemResponse struct + Error error + ErrorStr string + ErrorType ErrorType + Result Result + RuleName string + Status Status + func NewBulkItemErrorServerResponse(ruleName string, err error) *BulkItemResponse + func NewBulkItemSuccessResponse(ruleName string, result Result) *BulkItemResponse + type BulkResponse struct + Errors bool + Items []*BulkItemResponse + func (br *BulkResponse) MakeBulkResponse() *BulkResponse + type ErrorType string + type GettableAlertingRule struct + Alerts []*Alert + EvaluationDurationSeconds float64 + Health string + LastError string + LastEvaluation *time.Time + State string + type GettableAlertingRuleList struct + Items []*GettableAlertingRule + Total int + type PostableAlertingRule struct + func (r *PostableAlertingRule) Validate() error + type Result string + type RuleLevel string + const AnnotationKeyRuleUpdateTime + const RuleLevelCluster + const RuleLevelNamespace + type Status string