MCPcopy Index your code
hub / github.com/coder/coder / setHosts

Method setHosts

tailnet/configmaps.go:290–299  ·  view source on GitHub ↗
(hosts map[dnsname.FQDN][]netip.Addr)

Source from the content-addressed store, hash-verified

288}
289
290func (c *configMaps) setHosts(hosts map[dnsname.FQDN][]netip.Addr) {
291 c.L.Lock()
292 defer c.L.Unlock()
293 c.hosts = make(map[dnsname.FQDN][]netip.Addr)
294 for name, addrs := range hosts {
295 c.hosts[name] = slices.Clone(addrs)
296 }
297 c.netmapDirty = true
298 c.Broadcast()
299}
300
301// setBlockEndpoints sets whether we should block configuring endpoints we learn
302// from peers. It triggers a configuration of the engine if the value changes.

Callers 2

SetDNSHostsMethod · 0.80

Calls 3

LockMethod · 0.45
UnlockMethod · 0.45
CloneMethod · 0.45

Tested by 1