pub enum StreamFrame {
Snapshot {
active_sessions: Vec<ActiveSession>,
reachability: Vec<PeerReachability>,
},
Event {
record: Box<AuditRecord>,
},
Lagged {
dropped: u64,
},
}Expand description
One frame of the Request::Subscribe stream (pairing liveness & health telemetry). Tagged on
type (snake_case), so a frame is {"type":"snapshot",...} / {"type":"event",...} /
{"type":"lagged",...}. Event.record is the AuditRecord verbatim, so the stream and the
on-disk log carry ONE schema. The daemon serializes these; an embedding consumer deserializes
them (see docs/local-protocol.md “Live event stream”).
Variants§
Snapshot
The FIRST frame: a point-in-time picture of the mesh (open sessions + paired-peer reachability) so a fresh subscriber renders immediately without replaying history.
Event
A live audit event (session open/close, request, blob fetch, trust) — the tap on the hub.
Boxed so this (much larger) variant does not bloat every frame; serde delegates through the
Box, so the wire shape is the record’s fields verbatim.
Fields
record: Box<AuditRecord>Lagged
The subscriber fell dropped records behind the broadcast ring; the stream continues (a
fresh reconnect would re-Snapshot). Never drops the subscriber — lag is reported, never fatal.
Trait Implementations§
Source§impl Clone for StreamFrame
impl Clone for StreamFrame
Source§fn clone(&self) -> StreamFrame
fn clone(&self) -> StreamFrame
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more