testcomponent

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterStateTracker

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

func NewClusterStateTracker

func NewClusterStateTracker(o component.Options) (*ClusterStateTracker, error)

func (*ClusterStateTracker) NotifyClusterChange

func (s *ClusterStateTracker) NotifyClusterChange()

func (*ClusterStateTracker) Run

func (*ClusterStateTracker) Update

func (s *ClusterStateTracker) Update(args component.Arguments) error

type ClusterStateTrackerConfig

type ClusterStateTrackerConfig struct{}

type SlowUpdate

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

func NewSlowUpdate

func NewSlowUpdate(o component.Options) (*SlowUpdate, error)

func (*SlowUpdate) NotifyClusterChange

func (s *SlowUpdate) NotifyClusterChange()

func (*SlowUpdate) Run

func (s *SlowUpdate) Run(ctx context.Context) error

func (*SlowUpdate) Update

func (s *SlowUpdate) Update(args component.Arguments) error

type SlowUpdateConfig

type SlowUpdateConfig struct {
	UpdateLag time.Duration `alloy:"update_lag,attr"`
	Counter   int           `alloy:"counter,attr"` // used to trigger updates
}

type SlowUpdateExports

type SlowUpdateExports struct{}

type Ticker

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

func NewTicker

func NewTicker(o component.Options, cfg TickerConfig) (*Ticker, error)

func (*Ticker) Run

func (t *Ticker) Run(ctx context.Context) error

func (*Ticker) Update

func (t *Ticker) Update(args component.Arguments) error

type TickerConfig

type TickerConfig struct {
	Period   time.Duration `alloy:"period,attr"`
	MaxValue int           `alloy:"max_value,attr"`
}

type TickerExports

type TickerExports struct {
	Counter int `alloy:"counter,attr"`
}

Jump to

Keyboard shortcuts

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