flowrecords

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowRecords

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

func NewFlowRecords

func NewFlowRecords() *FlowRecords

func (*FlowRecords) AddFlowRecordToMap added in v1.0.0

func (fr *FlowRecords) AddFlowRecordToMap(connKey *flowexporter.ConnectionKey, record *flowexporter.FlowRecord)

AddFlowRecordToMap adds the flow record from record map given connection key. This is used only for unit tests.

func (*FlowRecords) AddOrUpdateFlowRecord added in v1.0.0

func (fr *FlowRecords) AddOrUpdateFlowRecord(key flowexporter.ConnectionKey, conn *flowexporter.Connection) error

AddOrUpdateFlowRecord adds or updates the flow record in the record map given the connection. It makes a copy of the connection object to record, to avoid race conditions between the connection store and the flow exporter.

func (*FlowRecords) DeleteFlowRecordWithoutLock added in v1.0.0

func (fr *FlowRecords) DeleteFlowRecordWithoutLock(connKey flowexporter.ConnectionKey) error

DeleteFlowRecordWithoutLock deletes the record from the record map given the connection key without grabbing the lock. Caller is expected to grab lock.

func (*FlowRecords) ForAllFlowRecordsDo

func (fr *FlowRecords) ForAllFlowRecordsDo(callback flowexporter.FlowRecordCallBack) error

ForAllFlowRecordsDo executes the callback for all records in the flow record map

func (*FlowRecords) GetFlowRecordFromMap added in v1.0.0

func (fr *FlowRecords) GetFlowRecordFromMap(connKey *flowexporter.ConnectionKey) (*flowexporter.FlowRecord, bool)

GetFlowRecordFromMap gets the flow record from record map given connection key. This is used only for unit tests.

func (*FlowRecords) ValidateAndUpdateStats

func (fr *FlowRecords) ValidateAndUpdateStats(connKey flowexporter.ConnectionKey, record flowexporter.FlowRecord)

ValidateAndUpdateStats validates and updates the flow record given the connection key. Caller is expected to grab lock.

Jump to

Keyboard shortcuts

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