ReadonlyreplicaThis replica's id; unique among the replicas sharing the backend.
Begin heartbeating/renewing (idempotent).
Release every turn and leadership this replica holds and stop renewing (idempotent).
Reserve a place in key's cross-replica FIFO. The bot calls it in ingress order.
Wait until it is ticket's turn (tickets of replicas that died are skipped), then
hold the key. Rejects with LeaseLostError ('superseded') when the ticket was
skipped because this replica was presumed dead, and with
CoordinationUnavailableError on timeout or backend failure.
Optionalopts: AcquireTurnOptionsCampaign for name until elected (or opts.signal aborts, rejecting).
Optionalopts: { signal?: AbortSignal }One election attempt: the leadership, or null when another replica leads.
Subscribe to coordinator events; returns an unsubscribe.
Cross-replica coordination backend. One instance per replica (per
Bot); the bot calls start when it starts and stop when it stops.