Implements
Constructors
Constructor
Parameters
Returns
MemoryCoordinator
Properties
replicaId
Implementation of
Coordinator.replicaId
Methods
start()
Returns
Promise<void>
Implementation of
Coordinator.start
stop()
Returns
Promise<void>
Implementation of
Coordinator.stop
crash()
'expired' (what its watchdog would do once the lease lapsed).
Returns
void
reserve()
key’s cross-replica FIFO. The bot calls it in ingress order.
Parameters
Returns
Promise<Ticket>
Implementation of
Coordinator.reserve
acquireTurn()
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.
Parameters
Returns
Promise<ChatTurn>
Implementation of
Coordinator.acquireTurn
lead()
name until elected (or opts.signal aborts, rejecting).
Parameters
Returns
Promise<Leadership>
Implementation of
Coordinator.lead
tryLead()
null when another replica leads.
Parameters
Returns
Promise<Leadership | null>
Implementation of
Coordinator.tryLead
on()
Type Parameters
Parameters
Returns
() =>void
Implementation of
Coordinator.on