ShardBusTransport
Defined in: packages/sharding/src/transport.ts:5
Carries ShardMessages between the processes or threads that run shards.
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: packages/sharding/src/transport.ts:13
Stops listening and releases the channel.
Returns
Section titled “Returns”void
onMessage()
Section titled “onMessage()”onMessage(
listener):void
Defined in: packages/sharding/src/transport.ts:9
Listens for messages from other shards.
Parameters
Section titled “Parameters”listener
Section titled “listener”(message) => void
Returns
Section titled “Returns”void
onPeerDown()?
Section titled “onPeerDown()?”
optionalonPeerDown(listener):void
Defined in: packages/sharding/src/transport.ts:11
Listens for the shards of a cluster that died, so pending requests to them can fail early.
Parameters
Section titled “Parameters”listener
Section titled “listener”(shardIds) => void
Returns
Section titled “Returns”void
post()
Section titled “post()”post(
message):void
Defined in: packages/sharding/src/transport.ts:7
Sends a message to the other shards. Delivery to the sender itself is not required.
Parameters
Section titled “Parameters”message
Section titled “message”Returns
Section titled “Returns”void