Module pump
Expand description
WS event pumps: parse in the receiver task, never block on a slow consumer.
The frames of the WebSocket sessions come in through a channel. The pump gives each one to its core
and hands the events to the Emitter: per-subscription buffers in front of the bot’s channel
. A bot that reads slowly fills the buffer of a subscription, and the policy of that
subscription applies: Conflate keeps the latest, DropNewest counts drops, Lossless overflows
(Event::Overflow, connector Degraded).
Functions§
- drain_
backlog - Gives the bot’s channel time to take what the buffers still hold (shutdown).
- run_
md_ pump - Runs the market data event pump until
cancelfires or the frame channel closes. - run_
ud_ pump - Runs the user data event pump until
cancelfires or the frame channel closes.