MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Notify

Function Notify

internal/events/utils.go:73–91  ·  view source on GitHub ↗

Notify 通知事件

(event Event)

Source from the content-addressed store, hash-verified

71
72// Notify 通知事件
73func Notify(event Event) {
74 // 特殊事件
75 switch event {
76 case EventQuit:
77 teaconst.IsQuiting = true
78 case EventTerminated:
79 teaconst.IsQuiting = true
80 }
81
82 locker.Lock()
83 m := eventsMap[event]
84 locker.Unlock()
85
86 for _, callbacks := range m {
87 for _, callback := range callbacks {
88 callback()
89 }
90 }
91}

Callers 9

ExitFunction · 0.92
StartMethod · 0.92
syncConfigMethod · 0.92
listenSockMethod · 0.92
reloadServerMethod · 0.92
restartMethod · 0.92
TestOnFunction · 0.92
FirewallFunction · 0.92
initFunction · 0.92

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1

TestOnFunction · 0.74