v1.1.0 Latest Latest

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

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




This section is empty.


View Source
var DefaultArguments = Arguments{
	SyncInterval:         5 * time.Minute,
	MimirNameSpacePrefix: "alloy",
	HTTPClientConfig:     config.DefaultHTTPClientConfig,
	PrometheusHTTPPrefix: "/prometheus",


This section is empty.


type Arguments

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

	RuleSelector          kubernetes.LabelSelector `alloy:"rule_selector,block,optional"`
	RuleNamespaceSelector kubernetes.LabelSelector `alloy:"rule_namespace_selector,block,optional"`

func (*Arguments) SetToDefault

func (args *Arguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

func (*Arguments) Validate

func (args *Arguments) Validate() error

Validate implements syntax.Validator.

type Component

type Component struct {
	// contains filtered or unexported fields

func New

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

New creates a new Component and initializes required clients based on the provided configuration.

func (*Component) CurrentHealth

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

func (*Component) DebugInfo

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

func (*Component) NotifyClusterChange added in v1.1.0

func (c *Component) NotifyClusterChange()

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                   `alloy:"error,attr,optional"`
	PrometheusRules     []DebugK8sPrometheusRule `alloy:"prometheus_rule,block,optional"`
	MimirRuleNamespaces []DebugMimirNamespace    `alloy:"mimir_rule_namespace,block,optional"`

type DebugK8sPrometheusRule

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

type DebugMimirNamespace

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

Jump to

Keyboard shortcuts

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