Skip to content

NodeClusterSocket

Node TCP socket transport for Effect Cluster runner-to-runner RPC.

This module provides the shared Node layers used by socket-based cluster transports. layerClientProtocol opens TCP sockets to peer runner addresses and wraps them in the current RPC serialization protocol. layerSocketServer exposes the socket server that receives incoming runner RPC traffic.

2 exports Added in v4.0.0 Source

Layers

Provides the cluster RpcClientProtocol by opening TCP sockets to runner addresses and using the current RPC serialization service.

Signature

declare const layerClientProtocol: Layer.Layer<
  Runners.RpcClientProtocol,
  never,
  RpcSerialization.RpcSerialization
>;

Provides the socket server used by cluster runners, listening on ShardingConfig.runnerListenAddress or runnerAddress.

Signature

declare const layerSocketServer: Layer.Layer<
  SocketServer.SocketServer,
  SocketServer.SocketServerError,
  ShardingConfig.ShardingConfig
>;