Expand description
Event queue for server-side streaming.
The executor writes StreamResponse events to an EventQueueWriter;
the HTTP layer reads them from an EventQueueReader and serializes them
as SSE frames.
InMemoryQueueWriter and InMemoryQueueReader are backed by a
bounded tokio::sync::mpsc channel.
Structs§
- Event
Queue Manager - Manages event queues for active tasks.
- InMemory
Queue Reader - In-memory
EventQueueReaderbacked by anmpscchannel receiver. - InMemory
Queue Writer - In-memory
EventQueueWriterbacked by anmpscchannel sender.
Constants§
- DEFAULT_
MAX_ EVENT_ SIZE - Default maximum event size in bytes (16 MiB).
- DEFAULT_
QUEUE_ CAPACITY - Default channel capacity for event queues.
- DEFAULT_
WRITE_ TIMEOUT - Default write timeout for event queue sends (5 seconds).
Traits§
- Event
Queue Reader - Trait for reading streaming events.
- Event
Queue Writer - Trait for writing streaming events.
Functions§
- new_
in_ memory_ queue - Creates a new in-memory event queue pair with the default capacity and default max event size.
- new_
in_ memory_ queue_ with_ capacity - Creates a new in-memory event queue pair with the specified capacity and default max event size.
- new_
in_ memory_ queue_ with_ options - Creates a new in-memory event queue pair with the specified capacity and maximum event size.