memory¶
- class litestar.channels.backends.memory.MemoryChannelsBackend[原始碼]¶
基底類別:
ChannelsBackendAn 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