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

Function init

internal/nodes/task_sync_api_nodes.go:19–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17var sharedSyncAPINodesTask = NewSyncAPINodesTask()
18
19func init() {
20 if !teaconst.IsMain {
21 return
22 }
23
24 events.On(events.EventStart, func() {
25 goman.New(func() {
26 sharedSyncAPINodesTask.Start()
27 })
28 })
29 events.OnClose(func() {
30 sharedSyncAPINodesTask.Stop()
31 })
32}
33
34// SyncAPINodesTask API节点同步任务
35type SyncAPINodesTask struct {

Callers

nothing calls this directly

Calls 5

OnFunction · 0.92
NewFunction · 0.92
OnCloseFunction · 0.92
StartMethod · 0.65
StopMethod · 0.65

Tested by

no test coverage detected