Documentation ¶
Index ¶
- type FlowRecords
- func (fr *FlowRecords) AddFlowRecordToMap(connKey *flowexporter.ConnectionKey, record *flowexporter.FlowRecord)
- func (fr *FlowRecords) AddFlowRecordWithoutLock(connKey *flowexporter.ConnectionKey, record *flowexporter.FlowRecord)
- func (fr *FlowRecords) AddOrUpdateFlowRecord(key flowexporter.ConnectionKey, conn *flowexporter.Connection) error
- func (fr *FlowRecords) DeleteFlowRecordFromMap(connKey *flowexporter.ConnectionKey) error
- func (fr *FlowRecords) ForAllFlowRecordsDo(callback flowexporter.FlowRecordCallBack) error
- func (fr *FlowRecords) ForAllFlowRecordsDoWithoutLock(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 ¶
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) AddFlowRecordWithoutLock ¶ added in v1.2.1
func (fr *FlowRecords) AddFlowRecordWithoutLock(connKey *flowexporter.ConnectionKey, record *flowexporter.FlowRecord)
AddFlowRecordWithoutLock adds the flow record from record map given connection key. Caller is expected to grab the lock the record map.
func (*FlowRecords) AddOrUpdateFlowRecord ¶
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. We expect caller to hold the lock for the connection store.
func (*FlowRecords) DeleteFlowRecordFromMap ¶ added in v1.2.1
func (fr *FlowRecords) DeleteFlowRecordFromMap(connKey *flowexporter.ConnectionKey) error
DeleteFlowRecordFromMap deletes the flow record from record map given the connection key.
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) ForAllFlowRecordsDoWithoutLock ¶ added in v1.2.1
func (fr *FlowRecords) ForAllFlowRecordsDoWithoutLock(callback flowexporter.FlowRecordCallBack) error
ForAllFlowRecordsDoWithoutLock executes the callback for all records in the flow record map. This is used in the perf testing.
func (*FlowRecords) GetFlowRecordFromMap ¶
func (fr *FlowRecords) GetFlowRecordFromMap(connKey *flowexporter.ConnectionKey) (*flowexporter.FlowRecord, bool)
GetFlowRecordFromMap gets the flow record from record map given the connection key.
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.