mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	Add bytes_sent and bytes_recvd to getSwitchPorts
This commit is contained in:
		
							parent
							
								
									b368421dbd
								
							
						
					
					
						commit
						3f8a4ab17d
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -510,6 +510,8 @@ func (a *admin) getData_getSwitchPeers() []admin_nodeInfo {
 | 
			
		|||
			{"ip", net.IP(addr[:]).String()},
 | 
			
		||||
			{"coords", fmt.Sprint(coords)},
 | 
			
		||||
			{"port", elem.port},
 | 
			
		||||
			{"bytes_sent", atomic.LoadUint64(&peer.bytesSent)},
 | 
			
		||||
			{"bytes_recvd", atomic.LoadUint64(&peer.bytesRecvd)},
 | 
			
		||||
		}
 | 
			
		||||
		peerInfos = append(peerInfos, info)
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue