Documentation
¶
Index ¶
- Variables
- type Arguments
- type Component
- func (c *Component) CurrentHealth() component.Health
- func (c *Component) LifecycleUpdate(args Arguments)
- func (c *Component) ReportHealthy()
- func (c *Component) ReportUnhealthy(err error)
- func (c *Component) Restart(ctx context.Context) error
- func (c *Component) Run(ctx context.Context) error
- func (c *Component) Shutdown()
- func (c *Component) Startup(ctx context.Context) error
- func (c *Component) SyncState()
- func (c *Component) Update(newConfig component.Arguments) error
- type ConfigUpdate
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultArguments = Arguments{ SyncInterval: 5 * time.Minute, HTTPClientConfig: config.DefaultHTTPClientConfig, }
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct {
Address string `alloy:"address,attr"`
HTTPClientConfig config.HTTPClientConfig `alloy:",squash"`
SyncInterval time.Duration `alloy:"sync_interval,attr,optional"`
TemplateFiles map[string]string `alloy:"template_files,attr,optional"`
GlobalConfig alloytypes.Secret `alloy:"global_config,attr"`
AlertmanagerConfigSelector kubernetes.LabelSelector `alloy:"alertmanagerconfig_selector,block,optional"`
AlertmanagerConfigNamespaceSelector kubernetes.LabelSelector `alloy:"alertmanagerconfig_namespace_selector,block,optional"`
}
func (*Arguments) SetToDefault ¶
func (args *Arguments) SetToDefault()
SetToDefault implements syntax.Defaulter.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new Component and initializes required clients based on the provided configuration. TODO: Add clustering support
func (*Component) CurrentHealth ¶
func (*Component) LifecycleUpdate ¶
update updates the Arguments used to create new Kubernetes or Mimir clients when restarting the component in response to configuration or cluster updates.
func (*Component) ReportHealthy ¶
func (c *Component) ReportHealthy()
func (*Component) ReportUnhealthy ¶
func (*Component) Restart ¶
restart stops any existing event processor and starts a new one. This method is a shortcut for calling shutdown, init, and startup in sequence.
func (*Component) Shutdown ¶
func (c *Component) Shutdown()
shutdown stops processing new events and waits for currently queued ones to be processed. After this method is called eventProcessor is unset and must be recreated.
type ConfigUpdate ¶
type ConfigUpdate struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.