Skip to content

ShardBusTransport

Defined in: packages/sharding/src/transport.ts:5

Carries ShardMessages between the processes or threads that run shards.

close(): void

Defined in: packages/sharding/src/transport.ts:13

Stops listening and releases the channel.

void


onMessage(listener): void

Defined in: packages/sharding/src/transport.ts:9

Listens for messages from other shards.

(message) => void

void


optional onPeerDown(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.

(shardIds) => void

void


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.

ShardMessage

void