Skip to content

BroadcastChannelTransport

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

One process: shards in the same process (or worker threads of it) talk over a BroadcastChannel.

new BroadcastChannelTransport(name): BroadcastChannelTransport

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

string

BroadcastChannelTransport

close(): void

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

Stops listening and releases the channel.

void

ShardBusTransport.close


onMessage(listener): void

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

Listens for messages from other shards.

(message) => void

void

ShardBusTransport.onMessage


post(message): void

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

Sends a message to the other shards. Delivery to the sender itself is not required.

ShardMessage

void

ShardBusTransport.post