Module election

Source

Modulesยง

etcd
rds

Enumsยง

LeaderChangeMessage
Messages sent when the leader changes.

Constantsยง

CANDIDATES_ROOT
CANDIDATE_LEASE_SECS ๐Ÿ”’
ELECTION_KEY
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.