跳转到内容
简体中文

ClusterClient

此内容尚不支持你的语言。

Defined in: src/cluster/ClusterClient.ts:108

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.

new ClusterClient(settings): ClusterClient

Defined in: src/cluster/ClusterClient.ts:123

ClusterClientSettings

ClusterClient

get clientAddress(): NodeAddress

Defined in: src/cluster/ClusterClient.ts:146

The synthetic identity this client uses in its hello handshake.

NodeAddress

ask<R>(targetPath, message, timeoutMs?): Promise<R>

Defined in: src/cluster/ClusterClient.ts:169

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.

R = unknown

string

unknown

number

Promise<R>


close(): Promise<void>

Defined in: src/cluster/ClusterClient.ts:198

Close the connection. Idempotent.

Promise<void>


send(targetPath, message): Promise<void>

Defined in: src/cluster/ClusterClient.ts:153

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.

string

unknown

Promise<void>