Rxova
Skip to content

LeaderOptions

Deliberately extends CommonOptions, not BusOptions: heartbeatMs here means the leader’s re-announce interval, which is a different thing from the bus’s presence ping. See the note in leader.ts about forwarding to getBus.

optional eligible?: boolean;

May this client hold the leadership? Default true.


optional heartbeatMs?: number;

How often the leader re-announces itself, in ms. Default 1000.


optional kind?: PeerKind;

What this client announces itself as. Defaults to ‘worker’ when there is no document, else ‘tab’.

CommonOptions.kind


optional leaseMs?: number;

How long a follower tolerates silence before calling the seat empty, in ms. Default 3000.


optional transport?: (name) => Transport;

Transport factory, mainly for tests. Defaults to defaultTransport.

ParameterType
namestring

Transport

CommonOptions.transport