Versions in this module Expand all Collapse all v0 v0.0.310 Jun 15, 2022 Changes in this version + type Alert struct + ActiveAt *time.Time + Annotations map[string]string + Labels map[string]string + State string + Value string + type AlertingRule struct + Alerts []*Alert + Annotations map[string]string + Duration float64 + EvaluationTime float64 + Health string + Labels map[string]string + LastError string + LastEvaluation *time.Time + Name string + Query string + State string + Type string + type Error struct + Detail string + Msg string + Type ErrorType + func (e *Error) Error() string + type ErrorType string + const ErrBadData + const ErrBadResponse + const ErrCanceled + const ErrClient + const ErrExec + const ErrServer + const ErrTimeout + type Options struct + Endpoint string + PrometheusEndpoint string + ThanosRuleResourceLabels string + ThanosRulerEndpoint string + func NewAlertingOptions() *Options + func (o *Options) AddFlags(fs *pflag.FlagSet, c *Options) + func (o *Options) ApplyTo(options *Options) + func (o *Options) Validate() []error + type RuleClient interface + PrometheusRules func(ctx context.Context) ([]*RuleGroup, error) + ThanosRules func(ctx context.Context) ([]*RuleGroup, error) + func NewRuleClient(options *Options) (RuleClient, error) + type RuleGroup struct + EvaluationTime float64 + File string + Interval float64 + LastEvaluation *time.Time + Name string + Rules []*AlertingRule