Expand description
Fan-out for the workspace’s SessionUpdate stream.
Re-exports§
use std::collections::HashMap;🔒use std::collections::HashSet;🔒use std::collections::VecDeque;🔒use std::sync::Arc;🔒use parking_lot::Mutex;🔒use tokio::sync::mpsc;🔒use crate::SessionSlot;🔒use crate::protocol::SessionUpdate;🔒
Structs§
- Byte
Count 🔒 - A
Writethat keeps the number of bytes written and nothing else. - Kept 🔒
- One frame in a seat’s ring, with the weight it was charged when it was minted: eviction subtracts that rather than weighing the frame again under the fan-out’s lock.
- Registration 🔒
- One subscriber’s end of the fan-out.
- Seat
Update - One frame on the stream: the update, and the number the seat’s own counter minted for it.
- Shared 🔒
- Update
Fanout 🔒 - Cloneable sender half of the workspace’s fan-out to its subscribers.
Enums§
- Subscriber
Role 🔒 - What a subscriber can do with what it is sent.
Constants§
- SEAT_
RING 🔒 - How many frames one seat’s stream keeps for repair.
- SEAT_
RING_ 🔒BYTES - The byte ceiling on one seat’s ring: the same 64 MiB the conversation copy
beside it keeps (
crate::conversation_window::CONVERSATION_CAP_BYTES).
Functions§
- frame_
bytes 🔒 - What a frame costs against
SEAT_RING_BYTES: the bytes its own JSON would write, plus the envelope around it. - remember 🔒
- Keep one unringed number, bounded to a ring’s frame count - the stretch beyond which no window a fill could serve reaches.
- ringed 🔒
- Whether the frame is kept in its seat’s ring for repair.