Skip to main content

Module stream

Module stream 

Source
Expand description

Lossless append-log JSON publishing over moq-net tracks.

The counterpart to the lossy snapshot mode: instead of one JSON value updated over time, a stream is an ordered log of self-contained records that preserves everything. Every Producer::append writes one JSON object as one frame, nothing is ever superseded, and a Consumer yields every record in order.

The whole log rides a single group that is never rolled: with ProducerConfig::compression on, that one group is one DEFLATE window, so every record compresses against all the earlier ones. There is deliberately no group rolling (and so no catch-up machinery): the only reason to roll would be moq-net’s per-group frame cap, which isn’t worth working around here. A caller that wants to bound the record rate throttles at the source (e.g. the timeline’s granularity); a consumer that finds a gap can fetch or extrapolate. A late joiner reads whatever frames the relay still retains for the group; deep history is served from a recording, not this live stream.

Structs§

Consumer
Consumes an ordered log of JSON records from a track, yielding every record in order.
ConsumerConfig
Configuration for a stream Consumer.
Producer
Publishes an ordered log of JSON records over a track, one record per frame in a single group.
ProducerConfig
Configuration for a stream Producer.