Documentation ¶
Index ¶
- type FlowRecords
- func (fr *FlowRecords) AddFlowRecordToMap(connKey *flowexporter.ConnectionKey, record *flowexporter.FlowRecord)
- func (fr *FlowRecords) AddOrUpdateFlowRecord(key flowexporter.ConnectionKey, conn *flowexporter.Connection) error
- func (fr *FlowRecords) DeleteFlowRecordWithoutLock(connKey flowexporter.ConnectionKey) error
- func (fr *FlowRecords) ForAllFlowRecordsDo(callback flowexporter.FlowRecordCallBack) error
- func (fr *FlowRecords) GetFlowRecordFromMap(connKey *flowexporter.ConnectionKey) (*flowexporter.FlowRecord, bool)
- func (fr *FlowRecords) ValidateAndUpdateStats(connKey flowexporter.ConnectionKey, record flowexporter.FlowRecord)
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.