SetDNSHosts replaces the map of DNS hosts for the connection.
(hosts map[dnsname.FQDN][]netip.Addr)
| 503 | |
| 504 | // SetDNSHosts replaces the map of DNS hosts for the connection. |
| 505 | func (c *Conn) SetDNSHosts(hosts map[dnsname.FQDN][]netip.Addr) error { |
| 506 | if c.dnsConfigurator == nil { |
| 507 | return xerrors.New("no DNSConfigurator set") |
| 508 | } |
| 509 | c.configMaps.setHosts(hosts) |
| 510 | return nil |
| 511 | } |
| 512 | |
| 513 | func (c *Conn) SetNodeCallback(callback func(node *Node)) { |
| 514 | c.nodeUpdater.setCallback(callback) |