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