MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / Init

Function Init

agent/init/hook/hook.go:18–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16)
17
18func Init() {
19 global.LOG.Info("agent hook: init global data start")
20 initGlobalData()
21 global.LOG.Info("agent hook: init global data done")
22 global.LOG.Info("agent hook: handle cronjob status start")
23 handleCronjobStatus()
24 global.LOG.Info("agent hook: handle cronjob status done")
25 global.LOG.Info("agent hook: handle clam status start")
26 handleClamStatus()
27 global.LOG.Info("agent hook: handle clam status done")
28 global.LOG.Info("agent hook: handle record status start")
29 handleRecordStatus()
30 global.LOG.Info("agent hook: handle record status done")
31 global.LOG.Info("agent hook: handle snapshot status start")
32 handleSnapStatus()
33 global.LOG.Info("agent hook: handle snapshot status done")
34 global.LOG.Info("agent hook: handle ollama model status start")
35 handleOllamaModelStatus()
36 global.LOG.Info("agent hook: handle ollama model status done")
37
38 global.LOG.Info("agent hook: load local dir start")
39 loadLocalDir()
40 global.LOG.Info("agent hook: load local dir done")
41
42 global.LOG.Info("agent hook: init docker config start")
43 initDockerConf()
44 global.LOG.Info("agent hook: init docker config done")
45 global.LOG.Info("agent hook: init alert task start")
46 initAlertTask()
47 global.LOG.Info("agent hook: init alert task done")
48 global.LOG.Info("agent hook: init monitor db start")
49 initMonitorDB()
50 global.LOG.Info("agent hook: init monitor db done")
51}
52
53func initGlobalData() {
54 settingRepo := repo.NewISettingRepo()

Callers

nothing calls this directly

Calls 10

initGlobalDataFunction · 0.85
handleCronjobStatusFunction · 0.85
handleClamStatusFunction · 0.85
handleRecordStatusFunction · 0.85
handleSnapStatusFunction · 0.85
handleOllamaModelStatusFunction · 0.85
loadLocalDirFunction · 0.85
initAlertTaskFunction · 0.85
initMonitorDBFunction · 0.85
initDockerConfFunction · 0.70

Tested by

no test coverage detected