Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
13
var
eventKeyId = 0
14
15
func
NewKey()
interface
{} {
16
locker.Lock()
17
defer
locker.Unlock()
18
eventKeyId++
19
return
eventKeyId
20
}
21
22
// On 增加事件回调
23
func
On(event Event, callback
func
()) {
Callers
1
OnKey
Function · 0.85
Calls
2
Lock
Method · 0.45
Unlock
Method · 0.45
Tested by
no test coverage detected