aggregator

package
v1.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flags *pflag.FlagSet)

AddFlags registers persistent aggregator flags.

Types

type BufferedAggregator

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

BufferedAggregator collects events from the inbound channel and produces batches on regular intervals. The batches are pushed to the work queue from which load-balanced configured workers consume the batches and publish to the outputs.

func NewBuffered

func NewBuffered(
	kevents chan *kevent.Kevent,
	errs chan error,
	config Config,
	outputConfig outputs.Config,
	transformerConfigs []transformers.Config,
	alertsenderConfigs []alertsender.Config,
) (*BufferedAggregator, error)

NewBuffered creates a new instance of the event aggregator.

func (*BufferedAggregator) Stop

func (agg *BufferedAggregator) Stop() error

Stop flushes pending event batches and instructs the aggregator to stop processing events.

type Config

type Config struct {
	// FlushPeriod determines the period for flushing batches to outputs.
	FlushPeriod time.Duration `json:"aggregator.flush-period" yaml:"aggregator.flush-period"`
	// FlushTimeout represents the max time to wait before announcing failed flushing of enqueued events
	FlushTimeout time.Duration `json:"aggregator.flush-timeout" yaml:"aggregator.flush-timeout"`
}

Config contains aggregator-specific configuration tweaks.

func (*Config) InitFromViper

func (c *Config) InitFromViper(v *viper.Viper)

InitFromViper initializes aggregator flags from viper.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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