pub enum FlowEvent<K> {
Started {
key: K,
side: FlowSide,
ts: Timestamp,
l4: Option<L4Proto>,
},
Packet {
key: K,
side: FlowSide,
len: usize,
ts: Timestamp,
},
Established {
key: K,
ts: Timestamp,
},
StateChange {
key: K,
from: FlowState,
to: FlowState,
ts: Timestamp,
},
Ended {
key: K,
reason: EndReason,
stats: FlowStats,
history: HistoryString,
},
Anomaly {
key: Option<K>,
kind: AnomalyKind,
ts: Timestamp,
},
}tracker only.Expand description
Events emitted by the tracker.
One packet typically produces one or two events. The Started
event fires on first sight of a flow and is followed by a
Packet event for the same packet. Subsequent packets of the
same flow produce a single Packet event each. TCP-aware events
(Established, StateChange) fire only when the extractor
supplied crate::TcpInfo.
Variants§
Started
First packet of a new flow.
Packet
Subsequent packet on a known flow.
Established
TCP only — 3WHS completed for this flow.
StateChange
State machine transitioned. Fires for TCP non-Established
transitions (e.g., Established → FinWait).
Ended
Flow ended (FIN/RST for TCP, idle/eviction for any flow).
Anomaly
Live, in-flight anomaly. The flow is still alive (use
Ended for end-of-life events). Opt-in: emitted only when
crate::FlowDriver::with_emit_anomalies is true.
key is None for tracker-global anomalies (e.g.
AnomalyKind::FlowTableEvictionPressure); Some(key) for
per-flow anomalies.