Not tested yet. Event 'close' is dispatched when last unit gets disconnected
Event 'unit' is dispatched when destination gets new unit connected
Sets or gets the default captureRejection value for all emitters.
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Name of the destination
Send request to establish binary stream session. This end of the stream is readable (receives data only) If chosen Unit will reject the request, Writable will emit "error" event If there are not connected Units serving corresponding Role, method will throw synchronous error. To ensure at least one unit is connected, use Destination.ready
Send request to establish binary stream session. This end of the stream is writable (forwards data only) If chosen Unit will reject the request, Writable will emit "error" event If there are not connected Units serving corresponding Role, method will throw synchronous error. To ensure at least one unit is connected, use Destination.ready
Send one-way message to all units serving the role
Send request. If cb argument is not provided, returns Promise<Context> If there are not connected Units serving corresponding Role, method will throw synchronous error. To ensure at least one unit is connected, use Destination.ready
Send one-way message. Use cb argument to ensure the message has benn written to underlying socket. Returns Unit chosen to send data to
Send requests to each unit of the role. Callback cb will be applied to each request If there are not connected Units serving corresponding Role, method will throw synchronous error. To ensure at least one unit is connected, use Destination.ready
Generated using TypeDoc
Destination represents a role (a service) of remote peers (Units). Destination is used as a gateway for outgoing communication. It implements round-robin load balancing between units
This class should not be instantiated directly. It is exposed for type declaration and documentation