raft: group Node fields

This commit is contained in:
Blake Mizerany
2014-06-13 15:23:08 -07:00
committed by Yicheng Qin
parent 6e95448ad7
commit 3a85d97fd9

View File

@@ -18,13 +18,11 @@ type config struct {
}
type Node struct {
// election timeout and heartbeat timeout in tick
sm *stateMachine
elapsed tick
election tick
heartbeat tick
// elapsed ticks after the last reset
elapsed tick
sm *stateMachine
}
func New(id int, heartbeat, election tick) *Node {