MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / scheduleConfigReload

Method scheduleConfigReload

internal/watcher/config_reload.go:29–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}
28
29func (w *Watcher) scheduleConfigReload() {
30 w.configReloadMu.Lock()
31 defer w.configReloadMu.Unlock()
32 if w.configReloadTimer != nil {
33 w.configReloadTimer.Stop()
34 }
35 w.configReloadTimer = time.AfterFunc(configReloadDebounce, func() {
36 w.configReloadMu.Lock()
37 w.configReloadTimer = nil
38 w.configReloadMu.Unlock()
39 w.reloadConfigIfChanged()
40 })
41}
42
43// ReloadConfigIfChanged runs the same config reload path used by filesystem events.
44func (w *Watcher) ReloadConfigIfChanged() {

Callers 2

handleEventMethod · 0.95

Calls 2

reloadConfigIfChangedMethod · 0.95
StopMethod · 0.65

Tested by 1