Skip to main content

Interface: Leader

Properties

clientId

readonly clientId: string;

Methods

close()

close(): void;

Returns

void


getSnapshot()

getSnapshot(): LeaderSnapshot;

Frozen; a new object only when the leader actually changes.

Returns

LeaderSnapshot


resign()

resign(): void;

Give up the seat now. Peers take over immediately rather than waiting for the lease.

Returns

void


setEligible()

setEligible(eligible): void;

Turn candidacy on or off. Eligibility is a property of the tab, not a component.

Parameters

ParameterType
eligibleboolean

Returns

void


subscribe()

subscribe(fn): () => void;

Parameters

ParameterType
fn() => void

Returns

() => void