Skip to main content

Module update_fanout

Module update_fanout 

Source
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§

ByteCount 🔒
A Write that 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.
SeatUpdate
One frame on the stream: the update, and the number the seat’s own counter minted for it.
Shared 🔒
UpdateFanout 🔒
Cloneable sender half of the workspace’s fan-out to its subscribers.

Enums§

SubscriberRole 🔒
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.