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

Method setCallback

tailnet/node.go:212–219  ·  view source on GitHub ↗

setCallback sets the callback for node changes. It also triggers a call for the current node immediately. u.L MUST NOT be held.

(callback func(node *Node))

Source from the content-addressed store, hash-verified

210// setCallback sets the callback for node changes. It also triggers a call
211// for the current node immediately. u.L MUST NOT be held.
212func (u *nodeUpdater) setCallback(callback func(node *Node)) {
213 u.L.Lock()
214 defer u.L.Unlock()
215 u.callback = callback
216 u.dirty = true
217 u.sentNode = false
218 u.Broadcast()
219}
220
221// setBlockEndpoints sets whether we block reporting Node endpoints. u.L MUST NOT
222// be held.

Callers 2

SetNodeCallbackMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1