Constructors
constructor
- new RedisPRCNode(id: string, handler: function, redisUrl?: undefined | string, __namedParameters?: object): RedisPRCNode
-
Parameters
-
id: string
-
handler: function
-
-
Parameters
Returns Promise<U>
-
Optional redisUrl: undefined | string
-
Default value __namedParameters: object = {}
-
poolId: string
-
pubClient: Redis
Properties
Private channelPrefix
channelPrefix: string
Private handler
handler: function
Type declaration
-
-
Parameters
Returns Promise<U>
Private pubClient
pubClient: Redis.Redis
Private subChannel
subChannel: string
Private subClient
subClient: Redis.Redis
Private subClientMessage$
Methods
call
- call(nodeId: string, params: T, timeout?: number): Promise<U>
-
Parameters
-
nodeId: string
-
params: T
-
Default value timeout: number = 15000
Returns Promise<U>
Private handleRPCCall
-
Parameters
Returns Promise<void>
RedisPRCNode 是一个节点,通过一个共享的 Redis,节点之间可以远程调用