admin: ServerInfo() returns info for each node (#4150)

ServerInfo() will gather information from all nodes before returning
it back to the client.
This commit is contained in:
Anis Elleuch
2017-04-21 15:15:53 +01:00
committed by Harshavardhana
parent df346753e1
commit 83abad0b37
8 changed files with 197 additions and 110 deletions
+8
View File
@@ -52,6 +52,14 @@ func (s *ConnStats) getTotalOutputBytes() uint64 {
return s.totalOutputBytes.Load()
}
// Return connection stats (total input/output bytes)
func (s *ConnStats) toServerConnStats() ServerConnStats {
return ServerConnStats{
TotalInputBytes: s.getTotalInputBytes(),
TotalOutputBytes: s.getTotalOutputBytes(),
}
}
// Prepare new ConnStats structure
func newConnStats() *ConnStats {
return &ConnStats{}