mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 22:55:06 +03:00
Allow setting link priorities
This commit is contained in:
parent
b8a2d9f125
commit
a28dca0fab
6 changed files with 36 additions and 26 deletions
|
@ -174,10 +174,11 @@ func run() int {
|
|||
if err := json.Unmarshal(recv.Response, &resp); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
table.SetHeader([]string{"Port", "Public Key", "IP Address", "Uptime", "RX", "TX", "URI"})
|
||||
table.SetHeader([]string{"Port", "Priority", "Public Key", "IP Address", "Uptime", "RX", "TX", "URI"})
|
||||
for _, peer := range resp.Peers {
|
||||
table.Append([]string{
|
||||
fmt.Sprintf("%d", peer.Port),
|
||||
fmt.Sprintf("%d", peer.Priority),
|
||||
peer.PublicKey,
|
||||
peer.IPAddress,
|
||||
(time.Duration(peer.Uptime) * time.Second).String(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue