nodeAddresses returns the addresses for the peer with the given publicKey, if known.
(publicKey key.NodePublic)
| 625 | |
| 626 | // nodeAddresses returns the addresses for the peer with the given publicKey, if known. |
| 627 | func (c *configMaps) nodeAddresses(publicKey key.NodePublic) ([]netip.Prefix, bool) { |
| 628 | c.L.Lock() |
| 629 | defer c.L.Unlock() |
| 630 | for _, lc := range c.peers { |
| 631 | if lc.node != nil && lc.node.Key == publicKey { |
| 632 | return lc.node.Addresses, true |
| 633 | } |
| 634 | } |
| 635 | return nil, false |
| 636 | } |
| 637 | |
| 638 | func (c *configMaps) fillPeerDiagnostics(d *PeerDiagnostics, peerID uuid.UUID) { |
| 639 | status := c.status() |
no test coverage detected