mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: group Node fields
This commit is contained in:
committed by
Yicheng Qin
parent
6e95448ad7
commit
3a85d97fd9
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user