1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Traits for abstracting data event sources
//!
//! These traits allow the collator to work with any data source that provides
//! the necessary information about network traffic direction and payload.
use Bytes;
/// Direction of data flow for a network event.
///
/// `Read` and `Write` correspond to the socket operation (recv/send) observed
/// by the tracing layer. Whether Read or Write carries requests vs. responses
/// depends on the vantage point: on a client, Write = outgoing requests and
/// Read = incoming responses; on a server the mapping is reversed. The
/// collator classifies messages by inspecting content (pseudo-headers), not
/// by assuming a fixed direction-to-role mapping.
/// Trait for data events that can be collated into HTTP exchanges.
///
/// Implement this trait for your data source (e.g., eBPF events, pcap packets)
/// to enable HTTP collation.