Skip to main content

Module election

Module election 

Source
Expand description

Leader Election for Distributed Write Coordination

Implements leader election using a lease-based approach with:

  • Lease acquisition and renewal
  • Automatic failover on leader failure
  • Fencing tokens to prevent split-brain
  • Integration with gossip for failure detection

Structs§

ElectionConfig
Configuration for leader election
ElectionManager
Leader election manager for multiple groups
ElectionStats
Statistics about election state
LeaderElection
Leader election coordinator
LeaderInfo
Information about the current leader
Vote
Vote in an election
VoteRequest
Request for votes in an election

Enums§

ElectionError
Errors that can occur during election
ElectionEvent
Events emitted by the election system
ElectionState
State of a leader election