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

Function On

internal/events/utils.go:23–25  ·  view source on GitHub ↗

On 增加事件回调

(event Event, callback func())

Source from the content-addressed store, hash-verified

21
22// On 增加事件回调
23func On(event Event, callback func()) {
24 OnKey(event, nil, callback)
25}
26
27func OnEvents(events []Event, callback func()) {
28 for _, event := range events {

Callers 15

initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92
initFunction · 0.92

Calls 1

OnKeyFunction · 0.85

Tested by 1

TestOnFunction · 0.74