$ open source · GPL-3.0 — need a commercial license? imqueue.com →

Home > @imqueue/core > ClusterManager > init

ClusterManager.init() method

Registers a cluster's membership callbacks with this manager and returns an identified handle.

Signature:

init(cluster: ICluster): InitializedCluster;

Parameters

Parameter

Type

Description

cluster

ICluster

the membership callbacks to feed

Returns:

InitializedCluster

the registered cluster, carrying the id that ClusterManager.remove() accepts

Remarks

Retain the returned handle (or its id) — it is the only thing remove() accepts. Registering does not start discovery: an implementation may already be listening from construction, in which case events that arrive before this call are discarded.