memory¶
- class litestar.channels.backends.memory.MemoryChannelsBackend[source]¶
Bases:
ChannelsBackendAn in-memory channels backend
- async publish(data: bytes, channels: Iterable[str]) None[source]¶
Publish
datatochannels. If a channel has not yet been subscribed to, this will be a no-op.- Parameters:
- Returns:
None
- Raises:
RuntimeError – If
on_startuphas not been called yet
- async subscribe(channels: Iterable[str]) None[source]¶
Subscribe to
channels, and enable publishing to them