typeRaftstruct{musync.Mutex// Lock to protect shared access to this peer's statepeers[]*labrpc.ClientEnd// RPC end points of all peers 所有peers的RPC端点persister*Persister// Object to hold this peer's persisted state 保存这个peer的持久化状态的对象meint// this peer's index into peers[] 在peers数组里的下标(索引index)deadint32// set by Kill()// Your data here (2A, 2B, 2C).// Look at the paper's Figure 2 for a description of what// state a Raft server must maintain.// votecurrentTermintvotedForint//lastResetElectionTime time.TimeelectionTimeOuttime.Time// entrieslog[]EntrycommitIndexintlastAppliedint// for leadernextIndex[]intmatchIndex[]int// commonapplyChchanApplyMsgstageint}typeEntrystruct{TermintCommandinterface{}}