mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-07-04 12:27:47 +00:00
Identify switchport for queue based on coords in stream ID
This commit is contained in:
@ -529,10 +529,12 @@ func (a *admin) getData_getSwitchQueues() admin_nodeInfo {
|
||||
getSwitchQueues := func() {
|
||||
queues := make([]map[string]interface{}, 0)
|
||||
for k, v := range switchTable.queues.bufs {
|
||||
nexthop := switchTable.bestPortForCoords([]byte(k))
|
||||
queue := map[string]interface{}{
|
||||
"queue_id": k,
|
||||
"queue_size": v.size,
|
||||
"queue_packets": len(v.packets),
|
||||
"queue_port": nexthop,
|
||||
}
|
||||
queues = append(queues, queue)
|
||||
}
|
||||
|
Reference in New Issue
Block a user