Fetch the repository succeeded.
/*
* Copyright (c) KylinSoft Co., Ltd. 2024.All rights reserved.
* PilotGo-plugin-topology licensed under the Mulan Permissive Software License, Version 2.
* See LICENSE file for more details.
* Author: Wangjunqi123 <wangjunqi@kylinos.cn>
* Date: Mon Nov 4 14:30:13 2024 +0800
*/
package main
import (
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/agentmanager"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/conf"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/db"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/db/mysqlmanager"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/global"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/webserver"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/logger"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/pluginclient"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/resourcemanage"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/service"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/service/webclient"
"gitee.com/openeuler/PilotGo-plugin-topology/cmd/server/signal"
sdklogger "gitee.com/openeuler/PilotGo/sdk/logger"
// "github.com/pyroscope-io/pyroscope/pkg/cmd/agent/profiler"
)
func main() {
// profiler.Start(profiler.Config{
// ApplicationName: "topo-server",
// ServerAddress: "http://localhost:4040",
// })
/*
init config
main.go中第一个执行的初始化模块,省略Global_Config全局指针变量调用的非空检测
*/
conf.InitConfig()
/*
init logger
*/
logger.InitLogger()
/*
init error control、resource release、goroutine end management
*/
ermanager, err := resourcemanage.CreateErrorReleaseManager(global.RootContext, global.Close)
if err != nil {
sdklogger.Fatal("%s", err.Error())
}
global.ERManager = ermanager
/*
init plugin client
*/
pluginclient.InitPluginClient()
/*
init agent manager
*/
agentmanager.InitAgentManager()
/*
init database
neo4j mysql redis prometheus
*/
db.InitDB()
/*
浏览器客户端
*/
webclient.InitWebClientsManager()
/*
init web server
*/
webserver.InitWebServer()
/*
init machine agent list
*/
agentmanager.Global_AgentManager.InitMachineList()
/*
topo插件自身数据采集模块周期性数据采集: 全局网络拓扑、单机拓扑
*/
service.InitPeriodCollectWorking([]string{}, [][]mysqlmanager.Filter_rule{})
/*
终止进程信号监听
main.go中最后执行,不进行全局指针变量非空检测
*/
signal.SignalMonitoring()
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。