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

Method setDERPMap

tailnet/configmaps.go:325–335  ·  view source on GitHub ↗

setDERPMap sets the DERP map, triggering a configuration of the engine if it has changed. c.L MUST NOT be held. Returns if the derpMap is dirty.

(derpMap *tailcfg.DERPMap)

Source from the content-addressed store, hash-verified

323// c.L MUST NOT be held.
324// Returns if the derpMap is dirty.
325func (c *configMaps) setDERPMap(derpMap *tailcfg.DERPMap) bool {
326 c.L.Lock()
327 defer c.L.Unlock()
328 if CompareDERPMaps(c.derpMap, derpMap) {
329 return false
330 }
331 c.derpMap = derpMap
332 c.derpMapDirty = true
333 c.Broadcast()
334 return true
335}
336
337// derMapLocked returns the current DERPMap. c.L must be held
338func (c *configMaps) derpMapLocked() *tailcfg.DERPMap {

Callers 4

NewConnFunction · 0.80
SetDERPMapMethod · 0.80

Calls 3

CompareDERPMapsFunction · 0.85
LockMethod · 0.45
UnlockMethod · 0.45