Raft

Undocumented in source.
class Raft {}

Constructors

this
this(Config c)
Undocumented in source.

Members

Functions

Step
ErrString Step(Message m)
Undocumented in source. Be warned that the author may not have intended to support it.
abortLeaderTransfer
void abortLeaderTransfer()
Undocumented in source. Be warned that the author may not have intended to support it.
addNode
void addNode(ulong id)
Undocumented in source. Be warned that the author may not have intended to support it.
appendEntry
void appendEntry(Entry[] es)
Undocumented in source. Be warned that the author may not have intended to support it.
bcastAppend
void bcastAppend()
Undocumented in source. Be warned that the author may not have intended to support it.
bcastHeartbeat
void bcastHeartbeat()
Undocumented in source. Be warned that the author may not have intended to support it.
bcastHeartbeatWithCtx
void bcastHeartbeatWithCtx(string ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
becomeCandidate
void becomeCandidate()
Undocumented in source. Be warned that the author may not have intended to support it.
becomeFollower
void becomeFollower(ulong term, ulong lead)
Undocumented in source. Be warned that the author may not have intended to support it.
becomeLeader
void becomeLeader()
Undocumented in source. Be warned that the author may not have intended to support it.
campaign
void campaign(CampaignType t)
Undocumented in source. Be warned that the author may not have intended to support it.
checkQuorumActive
bool checkQuorumActive()
Undocumented in source. Be warned that the author may not have intended to support it.
delProgress
void delProgress(ulong id)
Undocumented in source. Be warned that the author may not have intended to support it.
handleAppendEntries
void handleAppendEntries(Message m)
Undocumented in source. Be warned that the author may not have intended to support it.
handleHeartbeat
void handleHeartbeat(Message m)
Undocumented in source. Be warned that the author may not have intended to support it.
handleSnapshot
void handleSnapshot(Message m)
Undocumented in source. Be warned that the author may not have intended to support it.
hardState
HardState hardState()
Undocumented in source. Be warned that the author may not have intended to support it.
hasLeader
bool hasLeader()
Undocumented in source. Be warned that the author may not have intended to support it.
loadState
void loadState(HardState state)
Undocumented in source. Be warned that the author may not have intended to support it.
maybeCommit
bool maybeCommit()
Undocumented in source. Be warned that the author may not have intended to support it.
nodes
ulong[] nodes()
Undocumented in source. Be warned that the author may not have intended to support it.
numOfPendingConf
int numOfPendingConf(Entry[] ents)
Undocumented in source. Be warned that the author may not have intended to support it.
pastElectionTimeout
bool pastElectionTimeout()
Undocumented in source. Be warned that the author may not have intended to support it.
poll
int poll(ulong id, MessageType t, bool v)
Undocumented in source. Be warned that the author may not have intended to support it.
promotable
bool promotable()
Undocumented in source. Be warned that the author may not have intended to support it.
quorum
int quorum()
Undocumented in source. Be warned that the author may not have intended to support it.
removeNode
void removeNode(ulong id)
Undocumented in source. Be warned that the author may not have intended to support it.
reset
void reset(ulong term)
Undocumented in source. Be warned that the author may not have intended to support it.
resetPendingConf
void resetPendingConf()
Undocumented in source. Be warned that the author may not have intended to support it.
resetRandomizedElectionTimeout
void resetRandomizedElectionTimeout()
Undocumented in source. Be warned that the author may not have intended to support it.
restore
bool restore(Snapshot s)
Undocumented in source. Be warned that the author may not have intended to support it.
send
void send(Message m)
Undocumented in source. Be warned that the author may not have intended to support it.
sendAppend
void sendAppend(ulong to)
Undocumented in source. Be warned that the author may not have intended to support it.
sendHeartbeat
void sendHeartbeat(ulong to, string ctx)
Undocumented in source. Be warned that the author may not have intended to support it.
sendTimeoutNow
void sendTimeoutNow(ulong to)
Undocumented in source. Be warned that the author may not have intended to support it.
setProgress
void setProgress(ulong id, ulong match, ulong next)
Undocumented in source. Be warned that the author may not have intended to support it.
softState
SoftState* softState()
Undocumented in source. Be warned that the author may not have intended to support it.
stepCandidate
void stepCandidate(Message m)
Undocumented in source. Be warned that the author may not have intended to support it.
stepFollower
void stepFollower(Message m)
Undocumented in source. Be warned that the author may not have intended to support it.
stepLeader
void stepLeader(Message m)
Undocumented in source. Be warned that the author may not have intended to support it.
tickElection
void tickElection()
Undocumented in source. Be warned that the author may not have intended to support it.
tickHeartbeat
void tickHeartbeat()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_Term
ulong _Term;
Undocumented in source.
_Vote
ulong _Vote;
Undocumented in source.
_checkQuorum
bool _checkQuorum;
Undocumented in source.
_disProForw
bool _disProForw;
Undocumented in source.
_electionElapsed
int _electionElapsed;
Undocumented in source.
_electionTimeout
int _electionTimeout;
Undocumented in source.
_heartbeatElapsed
int _heartbeatElapsed;
Undocumented in source.
_heartbeatTimeout
int _heartbeatTimeout;
Undocumented in source.
_id
ulong _id;
Undocumented in source.
_lead
ulong _lead;
Undocumented in source.
_leadTransferee
ulong _leadTransferee;
Undocumented in source.
_maxInflight
int _maxInflight;
Undocumented in source.
_maxMsgSize
ulong _maxMsgSize;
Undocumented in source.
_msgs
Message[] _msgs;
Undocumented in source.
_pendingConf
bool _pendingConf;
Undocumented in source.
_preVote
bool _preVote;
Undocumented in source.
_prs
Progress[ulong] _prs;
Undocumented in source.
_raftLog
raftLog _raftLog;
Undocumented in source.
_randomizedElectionTimeout
int _randomizedElectionTimeout;
Undocumented in source.
_readOnly
readOnly _readOnly;
Undocumented in source.
_readStates
ReadState[] _readStates;
Undocumented in source.
_state
StateType _state;
Undocumented in source.
_step
void delegate(Message) _step;
Undocumented in source.
_tick
void delegate() _tick;
Undocumented in source.
_votes
bool[ulong] _votes;
Undocumented in source.

Meta