zenkey_fleet/tape.rs
1//! **Layer 4 — the tape.** Traffic as a *thing*: captured, read back,
2//! manufactured, measured.
3//!
4//! One rule places a module here: *it turns a stream of samples into a
5//! recording, or a recording into a stream of samples*. The bus is where
6//! traffic happens; this is where it is put in a box.
7//!
8//! * [`record`] — `.zrec` capture and replay. Normative for the format
9//! (RFC 09 §5.2 documents the etiquette).
10//! * [`ingest`] — the row dialect a capture is made of, read back: the same
11//! shape `echo --format ndjson` emits, so a pipe and a file are one
12//! format with one parser.
13//! * [`generate`] — traffic that never happened, on purpose: mock producers
14//! and fault patterns, every sample carrying the synthetic marker so that
15//! nothing downstream can mistake a rehearsal for a fleet.
16//! * [`synth`] — payload bodies for the above, synthesized from a schema.
17//! * [`bench`](mod@bench) — traffic manufactured to be timed, and the timing.
18//!
19//! The layer's own honesty rule is the one the file format carries: a
20//! capture taken while behind is a partial view, and it says so **at the
21//! position of the loss** (RFC 09 §5.1 O6, applied to a file). A replay of a
22//! lossy capture is not a replay of the fleet, and neither the reader nor
23//! the report is allowed to smooth that over.
24
25pub mod bench;
26pub mod ingest;
27pub mod record;
28
29#[cfg(feature = "decode")]
30pub mod generate;
31#[cfg(feature = "decode")]
32pub mod synth;