rules

package
v0.40.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	SyncInterval:         30 * time.Second,
	MimirNameSpacePrefix: "agent",
	HTTPClientConfig:     config.DefaultHTTPClientConfig,
	PrometheusHTTPPrefix: "/prometheus",
}

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	Address              string                  `river:"address,attr"`
	TenantID             string                  `river:"tenant_id,attr,optional"`
	UseLegacyRoutes      bool                    `river:"use_legacy_routes,attr,optional"`
	PrometheusHTTPPrefix string                  `river:"prometheus_http_prefix,attr,optional"`
	HTTPClientConfig     config.HTTPClientConfig `river:",squash"`
	SyncInterval         time.Duration           `river:"sync_interval,attr,optional"`
	MimirNameSpacePrefix string                  `river:"mimir_namespace_prefix,attr,optional"`

	RuleSelector          LabelSelector `river:"rule_selector,block,optional"`
	RuleNamespaceSelector LabelSelector `river:"rule_namespace_selector,block,optional"`
}

func (*Arguments) SetToDefault added in v0.35.0

func (args *Arguments) SetToDefault()

SetToDefault implements river.Defaulter.

func (*Arguments) Validate added in v0.35.0

func (args *Arguments) Validate() error

Validate implements river.Validator.

type Component

type Component struct {
	// contains filtered or unexported fields
}

func New added in v0.35.0

func New(o component.Options, args Arguments) (*Component, error)

func (*Component) CurrentHealth

func (c *Component) CurrentHealth() component.Health

func (*Component) DebugInfo

func (c *Component) DebugInfo() interface{}

func (*Component) Run

func (c *Component) Run(ctx context.Context) error

func (*Component) Update

func (c *Component) Update(newConfig component.Arguments) error

type ConfigUpdate

type ConfigUpdate struct {
	// contains filtered or unexported fields
}

type DebugInfo

type DebugInfo struct {
	Error               string                   `river:"error,attr,optional"`
	PrometheusRules     []DebugK8sPrometheusRule `river:"prometheus_rule,block,optional"`
	MimirRuleNamespaces []DebugMimirNamespace    `river:"mimir_rule_namespace,block,optional"`
}

type DebugK8sPrometheusRule

type DebugK8sPrometheusRule struct {
	Namespace     string `river:"namespace,attr"`
	Name          string `river:"name,attr"`
	UID           string `river:"uid,attr"`
	NumRuleGroups int    `river:"num_rule_groups,attr"`
}

type DebugMimirNamespace

type DebugMimirNamespace struct {
	Name          string `river:"name,attr"`
	NumRuleGroups int    `river:"num_rule_groups,attr"`
}

type LabelSelector

type LabelSelector struct {
	MatchLabels      map[string]string `river:"match_labels,attr,optional"`
	MatchExpressions []MatchExpression `river:"match_expression,block,optional"`
}

type MatchExpression

type MatchExpression struct {
	Key      string   `river:"key,attr"`
	Operator string   `river:"operator,attr"`
	Values   []string `river:"values,attr,optional"`
}

Jump to

Keyboard shortcuts

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