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

Method updateDerpMap

tailnet/telemetry.go:158–163  ·  view source on GitHub ↗

Given a DERPMap, anonymise all IPs and hostnames. Keep track of seen hostnames/cert names to anonymize them from future logs. b.mu must NOT be held.

(cur *tailcfg.DERPMap)

Source from the content-addressed store, hash-verified

156// Keep track of seen hostnames/cert names to anonymize them from future logs.
157// b.mu must NOT be held.
158func (b *TelemetryStore) updateDerpMap(cur *tailcfg.DERPMap) {
159 b.mu.Lock()
160 defer b.mu.Unlock()
161
162 b.updateDerpMapLocked(cur)
163}
164
165func (b *TelemetryStore) updateDerpMapLocked(cur *tailcfg.DERPMap) {
166 if cur == nil {

Callers 2

SetDERPMapMethod · 0.80
TestTelemetryStoreFunction · 0.80

Calls 3

updateDerpMapLockedMethod · 0.95
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1

TestTelemetryStoreFunction · 0.64