IRPCBroker
No summary provided.
interface IRPCBroker<TEvents extends Record<string, any>, TResponses extends Record<keyof TEvents, any>> extends IBaseBroker<TEvents>, AsyncEventEmitter<ToEventMap<TEvents, TResponses>> interface IRPCBroker<TEvents extends Record<string, any>, TResponses extends Record<keyof TEvents, any>> extends IBaseBroker<TEvents>, AsyncEventEmitter<ToEventMap<TEvents, TResponses>> call(event, data, timeoutDuration?)
:
Promise<TResponses[T]>
Makes an RPC call
| Name | Type | Optional | Description |
|---|---|---|---|
| event | T | No | None |
| data | TEvents[T] | No | None |
| timeoutDuration | number | Yes | None |
subscribe(group, events)
:
Promise<void>
Subscribes to the given events, grouping them by the given group name
Inherited from IBaseBroker
| Name | Type | Optional | Description |
|---|---|---|---|
| group | string | No | None |
| events | (keyof TEvents)[] | No | None |
unsubscribe(group, events)
:
Promise<void>
Unsubscribes from the given events - it's required to pass the same group name as when subscribing for proper cleanup
Inherited from IBaseBroker
| Name | Type | Optional | Description |
|---|---|---|---|
| group | string | No | None |
| events | (keyof TEvents)[] | No | None |