ClusterClient
Defined in: src/cluster/ClusterClient.ts:93
Connect to a cluster via one of the listed contact-points and exchange messages with actors on the cluster. See the file header for scope.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ClusterClient(
settings):ClusterClient
Defined in: src/cluster/ClusterClient.ts:108
Parameters
Section titled “Parameters”settings
Section titled “settings”Returns
Section titled “Returns”ClusterClient
Accessors
Section titled “Accessors”clientAddress
Section titled “clientAddress”Get Signature
Section titled “Get Signature”get clientAddress():
NodeAddress
Defined in: src/cluster/ClusterClient.ts:131
The synthetic identity this client uses in its hello handshake.
Returns
Section titled “Returns”Methods
Section titled “Methods”ask<
R>(targetPath,message,timeoutMs?):Promise<R>
Defined in: src/cluster/ClusterClient.ts:154
Send a message and wait for a reply. Resolves with the reply body on success, rejects with an Error on path-not-found / timeout / cluster-side ask failure.
Type Parameters
Section titled “Type Parameters”R = unknown
Parameters
Section titled “Parameters”targetPath
Section titled “targetPath”string
message
Section titled “message”unknown
timeoutMs?
Section titled “timeoutMs?”number
Returns
Section titled “Returns”Promise<R>
close()
Section titled “close()”close():
Promise<void>
Defined in: src/cluster/ClusterClient.ts:183
Close the connection. Idempotent.
Returns
Section titled “Returns”Promise<void>
send()
Section titled “send()”send(
targetPath,message):Promise<void>
Defined in: src/cluster/ClusterClient.ts:138
Fire-and-forget tell to the actor at targetPath on the cluster.
targetPath accepts the same shapes as ActorSystem.actorSelection:
full URI, absolute path, or relative-to-/user.
Parameters
Section titled “Parameters”targetPath
Section titled “targetPath”string
message
Section titled “message”unknown
Returns
Section titled “Returns”Promise<void>