Allow setting link priorities

This commit is contained in:
Neil Alexander 2022-10-19 18:13:39 +01:00
parent b8a2d9f125
commit a28dca0fab
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
6 changed files with 36 additions and 26 deletions

View file

@ -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(),