Module leader_election

Module leader_election 

Source
Expand description

Multi-Tab Leader Election Implementation

Implements leader election using BroadcastChannel + deterministic leader selection. Only one tab/instance can be the leader at any time for a given database. Uses lowest instance ID wins approach to resolve race conditions.

Structsยง

LeaderElectionManager
Manager for multi-tab leader election
LeaderElectionState
Leader election state for a database instance