5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-26 07:11:40 +00:00

Add bytes_sent and bytes_recvd to getSwitchPorts

This commit is contained in:
Neil Alexander 2018-09-25 17:59:01 +01:00
parent b368421dbd
commit 3f8a4ab17d
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -510,6 +510,8 @@ func (a *admin) getData_getSwitchPeers() []admin_nodeInfo {
{"ip", net.IP(addr[:]).String()}, {"ip", net.IP(addr[:]).String()},
{"coords", fmt.Sprint(coords)}, {"coords", fmt.Sprint(coords)},
{"port", elem.port}, {"port", elem.port},
{"bytes_sent", atomic.LoadUint64(&peer.bytesSent)},
{"bytes_recvd", atomic.LoadUint64(&peer.bytesRecvd)},
} }
peerInfos = append(peerInfos, info) peerInfos = append(peerInfos, info)
} }