flowaggregator

package
v0.0.0-...-234771b Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package flowaggregator defines tools for aggregating observed netflows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForFlowsToBeFlushed

func WaitForFlowsToBeFlushed(aggregator *FlowAggregator, timeoutDuration time.Duration, minEvents uint64) (uint64, error)

WaitForFlowsToBeFlushed waits up to timeoutDuration for at least minEvents flows to be flushed by the aggregator. It is intended for testing.

Types

type FlowAggregator

type FlowAggregator struct {
	FlushFlowsToSendInterval time.Duration // interval for checking flows to flush and send them to EP Forwarder

	TimeNowFunction func() time.Time // Allows to mock time in tests
	// contains filtered or unexported fields
}

FlowAggregator is used for space and time aggregation of NetFlow flows

func NewFlowAggregator

func NewFlowAggregator(sender sender.Sender, epForwarder eventplatform.Forwarder, config *config.NetflowConfig, hostname string, logger log.Component, rdnsQuerier rdnsquerier.Component) *FlowAggregator

NewFlowAggregator returns a new FlowAggregator

func (*FlowAggregator) GetFlowInChan

func (agg *FlowAggregator) GetFlowInChan() chan *common.Flow

GetFlowInChan returns flow input chan

func (*FlowAggregator) Start

func (agg *FlowAggregator) Start()

Start will start the FlowAggregator worker

func (*FlowAggregator) Stop

func (agg *FlowAggregator) Stop()

Stop will stop running FlowAggregator

Jump to

Keyboard shortcuts

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