MCPcopy Create free account
hub / github.com/coder/coder / SetDNSHosts

Method SetDNSHosts

tailnet/conn.go:505–511  ·  view source on GitHub ↗

SetDNSHosts replaces the map of DNS hosts for the connection.

(hosts map[dnsname.FQDN][]netip.Addr)

Source from the content-addressed store, hash-verified

503
504// SetDNSHosts replaces the map of DNS hosts for the connection.
505func (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
513func (c *Conn) SetNodeCallback(callback func(node *Node)) {
514 c.nodeUpdater.setCallback(callback)

Callers

nothing calls this directly

Implementers 1

fakeConnvpn/tunnel_internal_test.go

Calls 2

setHostsMethod · 0.80
NewMethod · 0.65

Tested by

no test coverage detected