Directus / @directus/memory / index / BusRedis
Class: BusRedis ​
Implements ​
Constructors ​
new BusRedis() ​
new BusRedis(
config
):BusRedis
Parameters ​
• config: Omit
<BusConfigRedis
, "type"
>
Returns ​
Defined in ​
packages/memory/src/bus/lib/redis.ts:24
Methods ​
publish() ​
publish<
T
>(channel
,message
):Promise
<void
>
Publish a message to subscribed clients in the given channel
Type Parameters ​
• T = unknown
Parameters ​
• channel: string
Channel to publish to
• message: T
Value to send to the subscribed clients
Returns ​
Promise
<void
>
Implementation of ​
Defined in ​
packages/memory/src/bus/lib/redis.ts:34
subscribe() ​
subscribe<
T
>(channel
,callback
):Promise
<void
>
Subscribe to messages in the given channel
Type Parameters ​
• T = unknown
Parameters ​
• channel: string
Channel to subscribe to
• callback: MessageHandler
<T
>
Payload that was published to the given channel
Returns ​
Promise
<void
>
Implementation of ​
Defined in ​
packages/memory/src/bus/lib/redis.ts:44
unsubscribe() ​
unsubscribe<
T
>(channel
,callback
):Promise
<void
>
Unsubscribe from a channel
Type Parameters ​
• T = unknown
Parameters ​
• channel: string
Channel to unsubscribe from
• callback: MessageHandler
<T
>
Callback to remove from the stack
Returns ​
Promise
<void
>