intermediate

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationElements added in v0.4.0

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

type AggregationFlowRecord added in v0.4.0

type AggregationFlowRecord struct {
	Record entities.Record
	// ReadyToSend is an indicator that we received all required records for the
	// given flow, i.e., records from source and destination nodes for the case
	// inter-node flow and record from the node for the case of intra-node flow.
	ReadyToSend bool
	// IsActive is a flag that indicates whether the flow is active or not. If
	// aggregation process stop receiving flows from collector process, we deem
	// the flow as inactive.
	IsActive bool
}

type AggregationInput added in v0.4.0

type AggregationInput struct {
	MessageChan       chan *entities.Message
	WorkerNum         int
	CorrelateFields   []string
	AggregateElements *AggregationElements
}

type AggregationProcess added in v0.3.1

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

func InitAggregationProcess

func InitAggregationProcess(input AggregationInput) (*AggregationProcess, error)

InitAggregationProcess takes in message channel (e.g. from collector) as input channel, workerNum(number of workers to process message) and correlateFields (fields to be correlated and filled).

func (*AggregationProcess) AggregateMsgByFlowKey added in v0.3.1

func (a *AggregationProcess) AggregateMsgByFlowKey(message *entities.Message) error

AggregateMsgByFlowKey gets flow key from records in message and stores in cache

func (*AggregationProcess) DeleteFlowKeyFromMap added in v0.3.1

func (a *AggregationProcess) DeleteFlowKeyFromMap(flowKey FlowKey)

func (*AggregationProcess) ForAllRecordsDo added in v0.3.1

func (a *AggregationProcess) ForAllRecordsDo(callback FlowKeyRecordMapCallBack) error

ForAllRecordsDo takes in callback function to process the operations to flowkey->records pairs in the map

func (*AggregationProcess) Start added in v0.3.1

func (a *AggregationProcess) Start()

func (*AggregationProcess) Stop added in v0.3.1

func (a *AggregationProcess) Stop()

type FlowKey added in v0.3.1

type FlowKey struct {
	SourceAddress      string
	DestinationAddress string
	Protocol           uint8
	SourcePort         uint16
	DestinationPort    uint16
}

type FlowKeyRecordMapCallBack added in v0.3.1

type FlowKeyRecordMapCallBack func(key FlowKey, record AggregationFlowRecord) error

Jump to

Keyboard shortcuts

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