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