mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Priority support (#964)
* Allow setting link priorities * Fix a bug * Allow setting priority on listeners and multicast interfaces * Update `yggdrasilctl` * Update to Arceliar/ironwood#5
This commit is contained in:
parent
9a9452dcc8
commit
f08dec822a
14 changed files with 79 additions and 56 deletions
|
@ -20,14 +20,15 @@ type SelfInfo struct {
|
|||
}
|
||||
|
||||
type PeerInfo struct {
|
||||
Key ed25519.PublicKey
|
||||
Root ed25519.PublicKey
|
||||
Coords []uint64
|
||||
Port uint64
|
||||
Remote string
|
||||
RXBytes uint64
|
||||
TXBytes uint64
|
||||
Uptime time.Duration
|
||||
Key ed25519.PublicKey
|
||||
Root ed25519.PublicKey
|
||||
Coords []uint64
|
||||
Port uint64
|
||||
Priority uint8
|
||||
Remote string
|
||||
RXBytes uint64
|
||||
TXBytes uint64
|
||||
Uptime time.Duration
|
||||
}
|
||||
|
||||
type DHTEntryInfo struct {
|
||||
|
@ -75,6 +76,7 @@ func (c *Core) GetPeers() []PeerInfo {
|
|||
info.Root = p.Root
|
||||
info.Coords = p.Coords
|
||||
info.Port = p.Port
|
||||
info.Priority = p.Priority
|
||||
info.Remote = p.Conn.RemoteAddr().String()
|
||||
if name := names[p.Conn]; name != "" {
|
||||
info.Remote = name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue