Skip to main content

Module election

Module election 

Source

Modules§

etcd
rds

Structs§

LeaderValue
The value of the leader. It is used to store the leader’s address.
MetasrvNodeInfo

Enums§

LeaderChangeMessage
Messages sent when the leader changes.

Constants§

CANDIDATE_LEASE_SECS
KEEP_ALIVE_INTERVAL_SECS 🔒

Traits§

Election
LeaderKey
LeaderKey is a key that represents the leader of metasrv. The structure is corresponding to [etcd_client::LeaderKey].

Functions§

listen_leader_change 🔒
send_leader_change_and_set_flags 🔒
Sends a leader change message to the channel and sets the is_leader flag. If a leader is elected, it will also set the leader_infancy flag to true.

Type Aliases§

ElectionRef