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

Method SetCallback

enterprise/replicasync/replicasync.go:444–450  ·  view source on GitHub ↗

SetCallback sets a function to execute whenever new peers are refreshed or updated.

(callback func())

Source from the content-addressed store, hash-verified

442// SetCallback sets a function to execute whenever new peers
443// are refreshed or updated.
444func (m *Manager) SetCallback(callback func()) {
445 m.mutex.Lock()
446 defer m.mutex.Unlock()
447 m.callback = callback
448 // Instantly call the callback to inform replicas!
449 go callback()
450}
451
452func (m *Manager) Close() error {
453 m.closeMutex.Lock()

Callers 2

updateEntitlementsMethod · 0.80
TestReplicaFunction · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1

TestReplicaFunction · 0.64