UseLeaderOptions
Extends
Section titled “Extends”Properties
Section titled “Properties”eligible?
Section titled “eligible?”optional eligible?: boolean;May this client hold the leadership? Default true.
Inherited from
Section titled “Inherited from”heartbeatMs?
Section titled “heartbeatMs?”optional heartbeatMs?: number;How often the leader re-announces itself, in ms. Default 1000. Heartbeat strategy only.
Inherited from
Section titled “Inherited from”optional kind?: PeerKind;What this client announces itself as. Defaults to ‘worker’ when there is no document, else ‘tab’.
Inherited from
Section titled “Inherited from”leaseMs?
Section titled “leaseMs?”optional leaseMs?: number;How long a follower tolerates silence before calling the seat empty, in ms. Default 3000. Heartbeat strategy only.
Inherited from
Section titled “Inherited from”locks?
Section titled “locks?”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.
Inherited from
Section titled “Inherited from”optional name?: string;Which bus to elect on. Defaults to the shared default name.
strategy?
Section titled “strategy?”optional strategy?: LeaderStrategy;How to arbitrate the seat. Default ‘auto’.
Inherited from
Section titled “Inherited from”transport?
Section titled “transport?”optional transport?: (name) => Transport;Transport factory, mainly for tests. Defaults to defaultTransport.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name | string |