mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: add Node.Next
This commit is contained in:
committed by
Yicheng Qin
parent
9545662c6b
commit
6e0a668455
@@ -29,3 +29,11 @@ func (n *Node) Step(m Message) {
|
||||
defer n.lk.Unlock()
|
||||
n.sm.Step(m)
|
||||
}
|
||||
|
||||
// Next advances the commit index and returns any new
|
||||
// commitable entries.
|
||||
func (n *Node) Next() []Entry {
|
||||
n.lk.Lock()
|
||||
defer n.lk.Unlock()
|
||||
return n.sm.nextEnts()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user