Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶
type MessageHandler func(vanflow.RecordMessage)
type RecordTypeSet ¶
RecordTypeSet specifies the Record Types that a Rule is applicable for.
func NewRecordTypeSet ¶
func NewRecordTypeSet(records ...vanflow.Record) RecordTypeSet
func NewRecordTypeSetAll ¶
func NewRecordTypeSetAll() RecordTypeSet
NewRecordTypeSetAll returns a special RecordTypeSet that matches records of all types
type Rule ¶
type Rule struct { // Priority of the rule. Lowest matching a record type wins. Priority int // Match is the set of record types the rule applies to Match RecordTypeSet // Strategy for sampling records Strategy SampleStrategy }
Rule specifies how particular vanflow record types should be logged.
type SampleStrategy ¶
type SampleStrategy interface { // Sample returns true when the record should be logged Sample(r vanflow.Record) bool }
func RateLimited ¶
func RateLimited(limit float64, burst int) SampleStrategy
RateLimited SampleStrategy samples events up to a limit (in events per second). Events exceeding the limit are not logged.
func TransportFlowHash ¶
func TransportFlowHash(percent float64, parent SampleStrategy) SampleStrategy
TransportFlowHash uses a deterministic hash based on a TransportBiflow ID. Uses the AppBiflow Parent field (Transport ID) so that ideally related flows are sampled together.
Click to show internal directories.
Click to hide internal directories.