Documentation
¶
Index ¶
- Variables
- func CheckDBHealth(db *gorm.DB) error
- func InitAsynqClient() *asynq.Client
- func InitAsynqServer() *asynq.Server
- 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, roleSvc service.RoleService, ...) []gin.HandlerFunc
- func InitNotificationConfig() notification.NotificationConfig
- func InitNotificationManager(config notification.NotificationConfig, asynqClient *asynq.Client, ...) *notification.Manager
- func InitRedis() redis.Cmdable
- func InitScheduler() *asynq.Scheduler
- func InitTables(db *gorm.DB) error
- func InitTrans() error
- func InitViper() error
- func InitWebHookViper()
- func IsDBAvailable(db *gorm.DB) bool
- type AliyunConfig
- type Cmd
- type Config
- type EmailConfig
- func (c *EmailConfig) GetChannelName() string
- func (c *EmailConfig) GetFromName() string
- func (c *EmailConfig) GetMaxRetries() int
- func (c *EmailConfig) GetPassword() string
- func (c *EmailConfig) GetRetryInterval() time.Duration
- func (c *EmailConfig) GetSMTPHost() string
- func (c *EmailConfig) GetSMTPPort() int
- func (c *EmailConfig) GetTimeout() time.Duration
- func (c *EmailConfig) GetUseTLS() bool
- func (c *EmailConfig) GetUsername() string
- func (c *EmailConfig) IsEnabled() bool
- func (c *EmailConfig) Validate() error
- type ExternalConfig
- type FeishuConfig
- func (c *FeishuConfig) GetAppID() string
- func (c *FeishuConfig) GetAppSecret() string
- func (c *FeishuConfig) GetChannelName() string
- func (c *FeishuConfig) GetMaxRetries() int
- func (c *FeishuConfig) GetPrivateMessageAPI() string
- func (c *FeishuConfig) GetRetryInterval() time.Duration
- func (c *FeishuConfig) GetTenantAccessTokenAPI() string
- func (c *FeishuConfig) GetTimeout() time.Duration
- func (c *FeishuConfig) GetWebhookURL() string
- func (c *FeishuConfig) IsEnabled() bool
- func (c *FeishuConfig) Validate() error
- type ImFeishuConfig
- type JWTConfig
- type K8sConfig
- type LLMConfig
- type LogConfig
- type MockConfig
- type MySQLConfig
- type NotificationConfig
- type NotificationConfigAdapter
- type PrometheusConfig
- type RedisConfig
- type ServerConfig
- type TavilyConfig
- type TreeConfig
- type WebhookConfig
Constants ¶
This section is empty.
Variables ¶
var CacheSet = wire.NewSet(cache.NewMonitorCache, cache.NewAlertManagerConfigCache, cache.NewAlertRuleConfigCache, cache.NewRecordRuleConfigCache, cache.NewPrometheusConfigCache, cache.NewBatchConfigManager)
var ClientSet = wire.NewSet(client.NewK8sClient)
var CronSet = wire.NewSet(cron.NewCronManager)
var DaoSet = wire.NewSet(alert.NewAlertManagerEventDAO, alert.NewAlertManagerOnDutyDAO, alert.NewAlertManagerPoolDAO, alert.NewAlertManagerRecordDAO, alert.NewAlertManagerRuleDAO, alert.NewAlertManagerSendDAO, scrape.NewScrapeJobDAO, scrape.NewScrapePoolDAO, config.NewMonitorConfigDAO, dao2.NewUserDAO, dao.NewRoleDAO, dao.NewApiDAO, dao.NewAuditDAO, dao3.NewClusterDAO, dao3.NewYamlTaskDAO, dao3.NewYamlTemplateDAO, dao4.NewWorkorderFormDesignDAO, dao4.NewTemplateDAO, dao4.NewWorkorderInstanceDAO, dao4.NewProcessDAO, dao4.NewWorkorderCategoryDAO, dao4.NewWorkorderInstanceCommentDAO, dao4.NewInstanceFlowDAO, dao4.NewInstanceTimeLineDAO, dao4.NewNotificationDAO, dao5.NewTreeNodeDAO, dao5.NewTreeLocalDAO)
var GlobalConfig = &Config{}
GlobalConfig 全局配置实例
var GlobalExternalConfig = &ExternalConfig{}
var HandlerSet = wire.NewSet(api2.NewRoleHandler, api2.NewApiHandler, api2.NewAuditHandler, api2.NewSystemHandler, api.NewUserHandler, api3.NewNotAuthHandler, api4.NewK8sNodeHandler, api4.NewK8sClusterHandler, api4.NewK8sDeploymentHandler, api4.NewK8sNamespaceHandler, api4.NewK8sSvcHandler, api4.NewK8sYamlTaskHandler, api4.NewK8sYamlTemplateHandler, api4.NewK8sDaemonSetHandler, api4.NewK8sEventHandler, api4.NewK8sStatefulSetHandler, api4.NewK8sServiceAccountHandler, api4.NewK8sRoleHandler, api4.NewK8sClusterRoleHandler, api4.NewK8sRoleBindingHandler, api4.NewK8sClusterRoleBindingHandler, api4.NewK8sIngressHandler, api4.NewK8sPodHandler, api4.NewK8sConfigMapHandler, api5.NewAlertPoolHandler, api5.NewMonitorConfigHandler, api5.NewOnDutyGroupHandler, api5.NewRecordRuleHandler, api5.NewAlertRuleHandler, api5.NewSendGroupHandler, api5.NewScrapeJobHandler, api5.NewScrapePoolHandler, api5.NewAlertEventHandler, api6.NewFormDesignHandler, api6.NewInstanceHandler, api6.NewInstanceFlowHandler, api6.NewInstanceCommentHandler, api6.NewInstanceTimeLineHandler, api6.NewTemplateHandler, api6.NewWorkorderProcessHandler, api6.NewCategoryGroupHandler, api6.NewNotificationHandler, api7.NewTreeNodeHandler, api7.NewTreeLocalHandler, terminal.NewTerminalHandler)
var Injector = wire.NewSet( InitMiddlewares, InitGinServer, InitLogger, InitRedis, InitDB, CronSet, wire.Struct(new(Cmd), "*"), )
var JobSet = wire.NewSet(startup.NewApplicationBootstrap)
var ManagerSet = wire.NewSet(manager.NewClusterManager, manager.NewDeploymentManager, manager.NewNamespaceManager, manager.NewServiceManager, manager.NewNodeManager, manager.NewEventManager, manager.NewStatefulSetManager, manager.NewDaemonSetManager, manager.NewServiceAccountManager, manager.NewTaintManager, manager.NewYamlManager, manager.NewConfigMapManager, manager.NewSecretManager, manager.NewPVManager, manager.NewPVCManager, manager.NewClusterRoleManager, manager.NewClusterRoleBindingManager, manager.NewRoleManager, manager.NewRoleBindingManager, manager.NewIngressManager, manager.NewPodManager)
var NotificationSet = wire.NewSet( InitAsynqClient, InitNotificationConfig, InitNotificationManager, )
var SSHSet = wire.NewSet(ssh.NewClient)
var ServiceSet = wire.NewSet(service4.NewClusterService, service4.NewDeploymentService, service4.NewNamespaceService, service4.NewSvcService, service4.NewNodeService, service4.NewTaintService, service4.NewYamlTaskService, service4.NewYamlTemplateService, service4.NewDaemonSetService, service4.NewEventService, service4.NewStatefulSetService, service4.NewServiceAccountService, service4.NewRoleService, service4.NewClusterRoleService, service4.NewRoleBindingService, service4.NewClusterRoleBindingService, service4.NewIngressService, service4.NewPodService, service4.NewConfigMapService, service4.NewSecretService, service4.NewPVService, service4.NewPVCService, service2.NewUserService, service.NewApiService, service.NewRoleService, service.NewAuditService, service.NewSystemService, alert2.NewAlertManagerEventService, alert2.NewAlertManagerOnDutyService, alert2.NewAlertManagerPoolService, alert2.NewAlertManagerRecordService, alert2.NewAlertManagerRuleService, alert2.NewAlertManagerSendService, scrape2.NewPrometheusScrapeService, scrape2.NewPrometheusPoolService, config2.NewMonitorConfigService, service3.NewNotAuthService, service5.NewFormDesignService, service5.NewInstanceService, service5.NewInstanceFlowService, service5.NewInstanceCommentService, service5.NewWorkorderInstanceTimeLineService, service5.NewWorkorderTemplateService, service5.NewWorkorderProcessService, service5.NewCategoryGroupService, service5.NewWorkorderNotificationService, service6.NewTreeNodeService, service6.NewTreeLocalService)
var UtilSet = wire.NewSet(utils.NewJWTHandler, sse.NewHandler)
Functions ¶
func CheckDBHealth ¶
func InitAsynqClient ¶
func InitAsynqServer ¶
func InitGinServer ¶
func InitGinServer( m []gin.HandlerFunc, userHdl *userApi.UserHandler, authApiHdl *systemApi.ApiHandler, authRoleHdl *systemApi.RoleHandler, systemHdl *systemApi.SystemHandler, notAuthHdl *notAuthHandler.NotAuthHandler, k8sClusterHdl *k8sApi.K8sClusterHandler, k8sDeploymentHdl *k8sApi.K8sDeploymentHandler, k8sNamespaceHdl *k8sApi.K8sNamespaceHandler, k8sNodeHdl *k8sApi.K8sNodeHandler, k8sSvcHdl *k8sApi.K8sSvcHandler, k8sYamlTaskHdl *k8sApi.K8sYamlTaskHandler, k8sYamlTemplateHdl *k8sApi.K8sYamlTemplateHandler, k8sDaemonSetHdl *k8sApi.K8sDaemonSetHandler, k8sEventHdl *k8sApi.K8sEventHandler, k8sStatefulSetHdl *k8sApi.K8sStatefulSetHandler, k8sServiceAccountHdl *k8sApi.K8sServiceAccountHandler, roleHdl *k8sApi.K8sRoleHandler, clusterRoleHdl *k8sApi.K8sClusterRoleHandler, roleBindingHdl *k8sApi.K8sRoleBindingHandler, clusterRoleBindingHdl *k8sApi.K8sClusterRoleBindingHandler, alertEventHdl *prometheusApi.AlertEventHandler, alertPoolHdl *prometheusApi.AlertPoolHandler, alertRuleHdl *prometheusApi.AlertRuleHandler, monitorConfigHdl *prometheusApi.MonitorConfigHandler, onDutyGroupHdl *prometheusApi.OnDutyGroupHandler, recordRuleHdl *prometheusApi.RecordRuleHandler, scrapePoolHdl *prometheusApi.ScrapePoolHandler, scrapeJobHdl *prometheusApi.ScrapeJobHandler, sendGroupHdl *prometheusApi.SendGroupHandler, auditHdl *systemApi.AuditHandler, formDesignHdl *workorderApi.FormDesignHandler, processHdl *workorderApi.WorkorderProcessHandler, templateHdl *workorderApi.TemplateHandler, instanceHdl *workorderApi.InstanceHandler, instanceFlowHdl *workorderApi.InstanceFlowHandler, instanceCommentHdl *workorderApi.InstanceCommentHandler, categoryHdl *workorderApi.CategoryGroupHandler, instanceTimeLineHdl *workorderApi.InstanceTimeLineHandler, treeNodeHdl *resourceApi.TreeNodeHandler, treeLocalHdl *resourceApi.TreeLocalHandler, notificationHdl *workorderApi.NotificationHandler, ingressHdl *k8sApi.K8sIngressHandler, k8sPodHdl *k8sApi.K8sPodHandler, ) *gin.Engine
InitGinServer 初始化web服务
func InitMiddlewares ¶
func InitMiddlewares(ih ijwt.Handler, l *zap.Logger, roleSvc service.RoleService, auditSvc service.AuditService) []gin.HandlerFunc
InitMiddlewares 初始化中间件
func InitNotificationConfig ¶
func InitNotificationConfig() notification.NotificationConfig
InitNotificationConfig 初始化通知配置
func InitNotificationManager ¶
func InitNotificationManager(config notification.NotificationConfig, asynqClient *asynq.Client, logger *zap.Logger) *notification.Manager
InitNotificationManager 初始化通知管理器
func InitScheduler ¶
func InitTables ¶
func InitWebHookViper ¶
func InitWebHookViper()
func IsDBAvailable ¶
Types ¶
type AliyunConfig ¶
type AliyunConfig struct { AccessKeyID string `env:"ALIYUN_ACCESS_KEY_ID" default:""` AccessKeySecret string `env:"ALIYUN_ACCESS_KEY_SECRET" default:""` }
AliyunConfig 阿里云配置(来自环境变量)
type Cmd ¶
type Cmd struct { Server *gin.Engine Bootstrap startup.ApplicationBootstrap Cron cron.CronManager }
func ProvideCmd ¶
func ProvideCmd() *Cmd
type Config ¶
type Config struct { Server ServerConfig `mapstructure:"server"` Log LogConfig `mapstructure:"log"` JWT JWTConfig `mapstructure:"jwt"` Redis RedisConfig `mapstructure:"redis"` MySQL MySQLConfig `mapstructure:"mysql"` Tree TreeConfig `mapstructure:"tree"` K8s K8sConfig `mapstructure:"k8s"` Prometheus PrometheusConfig `mapstructure:"prometheus"` Mock MockConfig `mapstructure:"mock"` Notification NotificationConfig `mapstructure:"notification"` Webhook WebhookConfig `mapstructure:"webhook"` }
Config 应用配置结构体
type EmailConfig ¶
type EmailConfig struct { Enabled bool `mapstructure:"enabled" env:"NOTIFICATION_EMAIL_ENABLED" default:"false"` SMTPHost string `mapstructure:"smtp_host" env:"NOTIFICATION_EMAIL_SMTP_HOST" default:"smtp.gmail.com"` SMTPPort int `mapstructure:"smtp_port" env:"NOTIFICATION_EMAIL_SMTP_PORT" default:"587"` Username string `mapstructure:"username" env:"NOTIFICATION_EMAIL_USERNAME" default:""` Password string `mapstructure:"password" env:"NOTIFICATION_EMAIL_PASSWORD" default:""` FromName string `mapstructure:"from_name" env:"NOTIFICATION_EMAIL_FROM_NAME" default:"AI-CloudOps"` MaxRetries int `mapstructure:"max_retries" env:"NOTIFICATION_EMAIL_MAX_RETRIES" default:"3"` RetryInterval string `mapstructure:"retry_interval" env:"NOTIFICATION_EMAIL_RETRY_INTERVAL" default:"5m"` Timeout string `mapstructure:"timeout" env:"NOTIFICATION_EMAIL_TIMEOUT" default:"30s"` UseTLS bool `mapstructure:"use_tls" env:"NOTIFICATION_EMAIL_USE_TLS" default:"true"` }
EmailConfig 邮箱配置
func (*EmailConfig) GetChannelName ¶
func (c *EmailConfig) GetChannelName() string
GetChannelName 获取邮件渠道名称
func (*EmailConfig) GetFromName ¶
func (c *EmailConfig) GetFromName() string
GetFromName 获取邮件发件人显示名称
func (*EmailConfig) GetMaxRetries ¶
func (c *EmailConfig) GetMaxRetries() int
GetMaxRetries 获取邮件发送最大重试次数
func (*EmailConfig) GetRetryInterval ¶
func (c *EmailConfig) GetRetryInterval() time.Duration
GetRetryInterval 获取邮件发送重试间隔
func (*EmailConfig) GetSMTPHost ¶
func (c *EmailConfig) GetSMTPHost() string
GetSMTPHost 获取SMTP服务器地址
func (*EmailConfig) GetTimeout ¶
func (c *EmailConfig) GetTimeout() time.Duration
GetTimeout 获取邮件发送超时时间
type ExternalConfig ¶
type ExternalConfig struct { LLM LLMConfig `mapstructure:"llm"` Aliyun AliyunConfig `mapstructure:"aliyun"` Tavily TavilyConfig `mapstructure:"tavily"` }
ExternalConfig 外部服务配置(仅来自环境变量)
type FeishuConfig ¶
type FeishuConfig struct { Enabled bool `mapstructure:"enabled" env:"NOTIFICATION_FEISHU_ENABLED" default:"false"` AppID string `mapstructure:"app_id" env:"NOTIFICATION_FEISHU_APP_ID" default:""` AppSecret string `mapstructure:"app_secret" env:"NOTIFICATION_FEISHU_APP_SECRET" default:""` WebhookURL string `mapstructure:"webhook_url" env:"NOTIFICATION_FEISHU_WEBHOOK_URL" default:"https://open.feishu.cn/open-apis/bot/v2/hook/"` PrivateMessageAPI string `` /* 138-byte string literal not displayed */ TenantAccessTokenAPI string `` /* 168-byte string literal not displayed */ MaxRetries int `mapstructure:"max_retries" env:"NOTIFICATION_FEISHU_MAX_RETRIES" default:"3"` RetryInterval string `mapstructure:"retry_interval" env:"NOTIFICATION_FEISHU_RETRY_INTERVAL" default:"5m"` Timeout string `mapstructure:"timeout" env:"NOTIFICATION_FEISHU_TIMEOUT" default:"10s"` }
FeishuConfig 飞书配置
func (*FeishuConfig) GetAppSecret ¶
func (c *FeishuConfig) GetAppSecret() string
GetAppSecret 获取飞书应用密钥
func (*FeishuConfig) GetChannelName ¶
func (c *FeishuConfig) GetChannelName() string
GetChannelName 获取飞书渠道名称
func (*FeishuConfig) GetMaxRetries ¶
func (c *FeishuConfig) GetMaxRetries() int
GetMaxRetries 获取飞书发送最大重试次数
func (*FeishuConfig) GetPrivateMessageAPI ¶
func (c *FeishuConfig) GetPrivateMessageAPI() string
GetPrivateMessageAPI 获取飞书私聊消息 API 地址
func (*FeishuConfig) GetRetryInterval ¶
func (c *FeishuConfig) GetRetryInterval() time.Duration
GetRetryInterval 获取飞书发送重试间隔
func (*FeishuConfig) GetTenantAccessTokenAPI ¶
func (c *FeishuConfig) GetTenantAccessTokenAPI() string
GetTenantAccessTokenAPI 获取飞书租户访问令牌 API 地址
func (*FeishuConfig) GetTimeout ¶
func (c *FeishuConfig) GetTimeout() time.Duration
GetTimeout 获取飞书请求超时时间
func (*FeishuConfig) GetWebhookURL ¶
func (c *FeishuConfig) GetWebhookURL() string
GetWebhookURL 获取飞书群机器人 Webhook URL
type ImFeishuConfig ¶
type ImFeishuConfig struct { GroupMessageAPI string `` /* 132-byte string literal not displayed */ RequestTimeoutSeconds int `mapstructure:"request_timeout_seconds" env:"WEBHOOK_IM_FEISHU_REQUEST_TIMEOUT_SECONDS" default:"10"` PrivateRobotAppID string `mapstructure:"private_robot_app_id" env:"WEBHOOK_IM_FEISHU_PRIVATE_ROBOT_APP_ID" default:""` PrivateRobotAppSecret string `mapstructure:"private_robot_app_secret" env:"WEBHOOK_IM_FEISHU_PRIVATE_ROBOT_APP_SECRET" default:""` TenantAccessTokenAPI string `` /* 166-byte string literal not displayed */ }
ImFeishuConfig 飞书即时消息配置
type JWTConfig ¶
type JWTConfig struct { Key1 string `mapstructure:"key1" env:"JWT_KEY1" default:"ebe3vxIP7sblVvUHXb7ZaiMPuz4oXo0l"` Key2 string `mapstructure:"key2" env:"JWT_KEY2" default:"ebe3vxIP7sblVvUHXb7ZaiMPuz4oXo0z"` Issuer string `mapstructure:"issuer" env:"JWT_ISSUER" default:"K5mBPBYNQeNWEBvCTE5msog3KSGTdhmx"` Expiration int64 `mapstructure:"expiration" env:"JWT_EXPIRATION" default:"3600"` }
JWTConfig JWT配置
type K8sConfig ¶
type K8sConfig struct {
RefreshCron string `mapstructure:"refresh_cron" env:"K8S_REFRESH_CRON" default:"@every 300s"`
}
K8sConfig Kubernetes配置
type LLMConfig ¶
type LLMConfig struct { APIKey string `env:"LLM_API_KEY" default:""` BaseURL string `env:"LLM_BASE_URL" default:""` }
LLMConfig LLM配置(来自环境变量)
type LogConfig ¶
type LogConfig struct { Dir string `mapstructure:"dir" env:"LOG_DIR" default:"./logs"` Level string `mapstructure:"level" env:"LOG_LEVEL" default:"debug"` }
LogConfig 日志配置
type MockConfig ¶
type MockConfig struct {
Enabled bool `mapstructure:"enabled" env:"MOCK_ENABLED" default:"true"`
}
MockConfig Mock配置
type MySQLConfig ¶
type MySQLConfig struct {
Addr string `` /* 126-byte string literal not displayed */
}
MySQLConfig MySQL配置
type NotificationConfig ¶
type NotificationConfig struct { Email *EmailConfig `mapstructure:"email"` Feishu *FeishuConfig `mapstructure:"feishu"` }
NotificationConfig 通知配置
func (*NotificationConfig) GetEmail ¶
func (c *NotificationConfig) GetEmail() *EmailConfig
GetEmail 获取邮件通知配置
func (*NotificationConfig) GetFeishu ¶
func (c *NotificationConfig) GetFeishu() *FeishuConfig
GetFeishu 获取飞书通知配置
type NotificationConfigAdapter ¶
type NotificationConfigAdapter struct {
// contains filtered or unexported fields
}
NotificationConfigAdapter 通知配置适配器
func (*NotificationConfigAdapter) GetEmail ¶
func (a *NotificationConfigAdapter) GetEmail() notification.EmailConfig
GetEmail 获取邮箱配置
func (*NotificationConfigAdapter) GetFeishu ¶
func (a *NotificationConfigAdapter) GetFeishu() notification.FeishuConfig
GetFeishu 获取飞书配置
type PrometheusConfig ¶
type PrometheusConfig struct { RefreshCron string `mapstructure:"refresh_cron" env:"PROMETHEUS_REFRESH_CRON" default:"@every 15s"` EnableAlert int `mapstructure:"enable_alert" env:"PROMETHEUS_ENABLE_ALERT" default:"0"` EnableRecord int `mapstructure:"enable_record" env:"PROMETHEUS_ENABLE_RECORD" default:"0"` AlertWebhookAddr string `mapstructure:"alert_webhook_addr" env:"PROMETHEUS_ALERT_WEBHOOK_ADDR" default:"http://localhost:8889/api/v1/alerts/receive"` AlertWebhookFileDir string `mapstructure:"alert_webhook_file_dir" env:"PROMETHEUS_ALERT_WEBHOOK_FILE_DIR" default:"/tmp/webhook_files"` HttpSdAPI string `mapstructure:"httpSdAPI" env:"PROMETHEUS_HTTP_SD_API" default:"http://localhost:8888/api/not_auth/getTreeNodeBindIps"` }
PrometheusConfig Prometheus配置
type RedisConfig ¶
type RedisConfig struct { Addr string `mapstructure:"addr" env:"REDIS_ADDR" default:"localhost:6379"` Password string `mapstructure:"password" env:"REDIS_PASSWORD" default:""` }
RedisConfig Redis配置
type ServerConfig ¶
type ServerConfig struct {
Port string `mapstructure:"port" env:"SERVER_PORT" default:"8889"`
}
ServerConfig 服务器配置
type TavilyConfig ¶
type TavilyConfig struct {
APIKey string `env:"TAVILY_API_KEY" default:""`
}
TavilyConfig Tavily配置(来自环境变量)
type TreeConfig ¶
type TreeConfig struct { CheckStatusCron string `mapstructure:"check_status_cron" env:"TREE_CHECK_STATUS_CRON" default:"@every 300s"` PasswordEncryptionKey string `mapstructure:"password_encryption_key" env:"TREE_PASSWORD_ENCRYPTION_KEY" default:"ebe3vxIP7sblVvUHXb7ZaiMPuz4oXo0l"` }
TreeConfig 树形结构配置
type WebhookConfig ¶
type WebhookConfig struct { Port string `mapstructure:"port" env:"WEBHOOK_PORT" default:"8888"` FixedWorkers int `mapstructure:"fixed_workers" env:"WEBHOOK_FIXED_WORKERS" default:"10"` FrontDomain string `mapstructure:"front_domain" env:"WEBHOOK_FRONT_DOMAIN" default:"http://localhost:3000"` BackendDomain string `mapstructure:"backend_domain" env:"WEBHOOK_BACKEND_DOMAIN" default:"http://localhost:8889"` DefaultUpgradeMinutes int `mapstructure:"default_upgrade_minutes" env:"WEBHOOK_DEFAULT_UPGRADE_MINUTES" default:"60"` AlertManagerAPI string `mapstructure:"alert_manager_api" env:"WEBHOOK_ALERT_MANAGER_API" default:"http://localhost:9093"` CommonMapRenewIntervalSeconds int `mapstructure:"common_map_renew_interval_seconds" env:"WEBHOOK_COMMON_MAP_RENEW_INTERVAL_SECONDS" default:"300"` ImFeishu ImFeishuConfig `mapstructure:"im_feishu"` }
WebhookConfig Webhook配置(用于webhook子系统)