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

Function NewKey

internal/events/utils.go:15–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13var eventKeyId = 0
14
15func NewKey() interface{} {
16 locker.Lock()
17 defer locker.Unlock()
18 eventKeyId++
19 return eventKeyId
20}
21
22// On 增加事件回调
23func On(event Event, callback func()) {

Callers 1

OnKeyFunction · 0.85

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected