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

Function Remove

internal/events/utils.go:56–70  ·  view source on GitHub ↗

Remove 删除事件回调

(key interface{})

Source from the content-addressed store, hash-verified

54
55// Remove 删除事件回调
56func Remove(key interface{}) {
57 if key == nil {
58 return
59 }
60
61 locker.Lock()
62 for k, m := range eventsMap {
63 _, ok := m[key]
64 if ok {
65 delete(m, key)
66 eventsMap[k] = m
67 }
68 }
69 locker.Unlock()
70}
71
72// Notify 通知事件
73func Notify(event Event) {

Callers 4

CloseMethod · 0.92
StopMethod · 0.92
CloseMethod · 0.92
TestOnFunction · 0.92

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1

TestOnFunction · 0.74