Lfan-ke/raft-moonbit/raftpb does not have a README file
pub(all) struct AppendEntriesReply {
term : UInt64
success : Bool
match_index : UInt64
conflict_index : UInt64
conflict_term : UInt64
reject_index : UInt64
} derive(Eq)pub(all) struct HeartbeatArgs {
term : UInt64
leader_id : String
commit : UInt64
context : Bytes
} derive(Eq)fn InstallSnapshotArgs::whole(term : UInt64, leader_id : String, snapshot : Snapshot) -> InstallSnapshotArgspub(all) enum Payload {
PreVote(RequestVoteArgs)
PreVoteResp(RequestVoteReply)
Vote(RequestVoteArgs)
VoteResp(RequestVoteReply)
Append(AppendEntriesArgs)
AppendResp(AppendEntriesReply)
Heartbeat(HeartbeatArgs)
HeartbeatResp(HeartbeatReply)
Snapshot(InstallSnapshotArgs)
TimeoutNow(UInt64)
Propose(Array[Entry])
ReadIndex(Bytes)
ReadIndexResp(ReadIndexResp)
TransferLeader(String)
ForgetLeader
}pub(all) struct RequestVoteArgs {
term : UInt64
candidate_id : String
last_log_index : UInt64
last_log_term : UInt64
} derive(Eq)let no_limit : UInt64Raft consensus algorithm implemented in MoonBit.