mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
refactor(peer_server): move stats construction to factories
This commit is contained in:
@@ -10,6 +10,13 @@ type raftFollowersStats struct {
|
||||
Followers map[string]*raftFollowerStats `json:"followers"`
|
||||
}
|
||||
|
||||
func newRaftFollowersStats(name string) *raftFollowersStats {
|
||||
return &raftFollowersStats{
|
||||
Leader: name,
|
||||
Followers: make(map[string]*raftFollowerStats),
|
||||
}
|
||||
}
|
||||
|
||||
type raftFollowerStats struct {
|
||||
Latency struct {
|
||||
Current float64 `json:"current"`
|
||||
|
||||
Reference in New Issue
Block a user