# Functions
AccountedDiscoverInstance will call upon DiscoverInstance and will keep track of discovery tokens such that management of multiple discoveries can figure out whether all instances in a topology are accounted for.
AttemptElection tries to grab leadership (become active node).
AttemptFailureDetectionRegistration tries to add a failure-detection entry; if this fails that means the problem has already been detected.
AttemptRecoveryRegistration tries to add a recovery entry; if this fails that means recovery is already in place.
CheckAndRecover is the main entry point for the recovery mechanism.
ClearActiveFailureDetections clears the "in_active_period" flag for old-enough detections, thereby allowing for further detections on cleared instances.
ClearActiveRecoveries clears the "in_active_period" flag for old-enough recoveries, thereby allowing for further recoveries on cleared instances.
ContinuousAgentsPoll starts an asynchronuous infinite process where agents are periodically investigated and their status captured, and long since unseen agents are purged and forgotten.
ContinuousDiscovery starts an asynchronuous infinite discovery process where instances are periodically investigated and their status captured, and long since unseen instances are purged and forgotten.
No description provided by the author
DiscoverInstance will attempt discovering an instance (unless it is already up to date) and will list down its master and slaves (if any) for further discovery.
ElectedNode returns the hostname of the elected node.
GetCandidateSiblingOfIntermediateMaster chooses the best sibling of a dead intermediate master to whom the IM's slaves can be moved.
No description provided by the author
No description provided by the author
GrabElection forcibly grabs leadership.
HealthTest attempts to write to the backend database and get a result.
IsElected checks whether this node is the elected active node.
No description provided by the author
ReadActiveRecoveries reads active recovery entry/audit entires from topology_recovery.
ReadActiveRecoveries reads active recovery entry/audit entires from topology_recovery.
ReadCompletedRecoveries reads completed recovery entry/audit entires from topology_recovery.
ReadCRecoveries reads latest recovery entreis from topology_recovery.
ReadRecentlyActiveInstanceRecovery reads recently completed entries for a given cluster.
ReadRecentlyActiveInstanceRecovery reads recently completed entries for a given instance.
ReadCRecoveries reads latest recovery entreis from topology_recovery.
No description provided by the author
No description provided by the author
Reelect clears the way for re-elections.
ResolveRecovery is called on completion of a recovery process and updates the recovery status.
Start discovery begins a one time asynchronuous discovery process for the given instance and all of its topology connected instances.
# Structs
No description provided by the author
Token is used to identify and validate requests to this service.
TopologyRecovery represents an entry in the topology_recovery table.
# Type aliases
InstancesByCountSlaves sorts instances by umber of slaves, descending.