Documentation ¶
Index ¶
- func InitAndRefreshK8sClient(K8sClient client.K8sClient, logger *zap.Logger, PromCache cache.MonitorCache, ...) *cron.Cron
- func InitCasbin(db *gorm.DB) *casbin.Enforcer
- func InitDB() *gorm.DB
- func InitGinServer(m []gin.HandlerFunc, userHdl *userApi.UserHandler, ...) *gin.Engine
- func InitLogger() *zap.Logger
- func InitMiddlewares(ih ijwt.Handler, l *zap.Logger, enforcer *casbin.Enforcer) []gin.HandlerFunc
- func InitRedis() redis.Cmdable
- func InitTables(db *gorm.DB) error
- func InitTrans() error
- func InitViper() error
- func InitWebHookViper()
- type Cmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitAndRefreshK8sClient ¶
func InitAndRefreshK8sClient(K8sClient client.K8sClient, logger *zap.Logger, PromCache cache.MonitorCache, manager cn.CronManager) *cron.Cron
InitAndRefreshK8sClient 初始化并启动定时刷新任务 返回 cron 调度器实例以便调用者可以在需要时停止它
func InitGinServer ¶
func InitGinServer( m []gin.HandlerFunc, userHdl *userApi.UserHandler, authApiHdl *systemApi.ApiHandler, authMenuHdl *systemApi.MenuHandler, authRoleHdl *systemApi.RoleHandler, authPermissionHdl *systemApi.PermissionHandler, treeNodeHdl *treeApi.TreeNodeHandler, treeAliResourceHdl *treeApi.AliResourceHandler, treeEcsResourceHdl *treeApi.EcsResourceHandler, treeEcsHdl *treeApi.EcsHandler, treeElbHdl *treeApi.ElbHandler, treeRdsHdl *treeApi.RdsHandler, notAuthHdl *notAuthHandler.NotAuthHandler, k8sClusterHdl *k8sApi.K8sClusterHandler, k8sConfigMapHdl *k8sApi.K8sConfigMapHandler, k8sDeploymentHdl *k8sApi.K8sDeploymentHandler, k8sNamespaceHdl *k8sApi.K8sNamespaceHandler, k8sNodeHdl *k8sApi.K8sNodeHandler, k8sPodHdl *k8sApi.K8sPodHandler, k8sSvcHdl *k8sApi.K8sSvcHandler, k8sTaintHdl *k8sApi.K8sTaintHandler, k8sYamlTaskHdl *k8sApi.K8sYamlTaskHandler, k8sYamlTemplateHdl *k8sApi.K8sYamlTemplateHandler, k8sAppHdl *k8sApi.K8sAppHandler, alertEventHdl *prometheusApi.AlertEventHandler, alertPoolHdl *prometheusApi.AlertPoolHandler, alertRuleHdl *prometheusApi.AlertRuleHandler, configYamlHdl *prometheusApi.ConfigYamlHandler, onDutyGroupHdl *prometheusApi.OnDutyGroupHandler, recordRuleHdl *prometheusApi.RecordRuleHandler, scrapePoolHdl *prometheusApi.ScrapePoolHandler, scrapeJobHdl *prometheusApi.ScrapeJobHandler, sendGroupHdl *prometheusApi.SendGroupHandler, ) *gin.Engine
InitGinServer 初始化web服务
func InitMiddlewares ¶
InitMiddlewares 初始化中间件
func InitTables ¶
func InitWebHookViper ¶
func InitWebHookViper()
Types ¶
type Cmd ¶
type Cmd struct { Server *gin.Engine Cron *cron.Cron Start service.AliResourceService }
func InitWebServer ¶
func InitWebServer() *Cmd
Click to show internal directories.
Click to hide internal directories.