Rxova
Skip to content

LeaderOptions

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. Heartbeat strategy only.


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. Heartbeat strategy only.


optional locks?: LockManagerLike;

The Web Locks manager to elect on. Defaults to navigator.locks.

A test seam: @use-everywhere/test-utils passes a FakeLockManager here so several simulated tabs can queue on one seat — and so a crashed tab’s lock is reclaimed — in a plain test process.


optional strategy?: LeaderStrategy;

How to arbitrate the seat. Default ‘auto’.


optional transport?: (name) => Transport;

Transport factory, mainly for tests. Defaults to defaultTransport.

ParameterType
namestring

Transport

CommonOptions.transport