memory¶
- class litestar.channels.backends.memory.MemoryChannelsBackend[源代码]¶
-
An in-memory channels backend
- async publish(data: bytes, channels: Iterable[str]) None[源代码]¶
Publish
datatochannels. If a channel has not yet been subscribed to, this will be a no-op.- 参数:
- 返回:
None
- 抛出:
RuntimeError -- If
on_startuphas not been called yet
- async subscribe(channels: Iterable[str]) None[源代码]¶
Subscribe to
channels, and enable publishing to them