中文枚举
This commit is contained in:
@@ -163,7 +163,7 @@ type LoraMeshConfig struct {
|
||||
|
||||
// NotifyConfig 包含了所有与通知服务相关的配置
|
||||
type NotifyConfig struct {
|
||||
Primary string `yaml:"primary"` // 首选通知渠道 (e.g., "smtp", "wechat", "lark", "log")
|
||||
Primary string `yaml:"primary"` // 首选通知渠道 (e.g., "邮件", "企业微信", "飞书", "日志")
|
||||
FailureThreshold int `yaml:"failureThreshold"` // 连续失败多少次后触发广播模式
|
||||
SMTP SMTPConfig `yaml:"smtp"`
|
||||
WeChat WeChatConfig `yaml:"wechat"`
|
||||
|
||||
@@ -14,13 +14,13 @@ type NotifierType string
|
||||
|
||||
const (
|
||||
// NotifierTypeSMTP 表示 SMTP 邮件通知器。
|
||||
NotifierTypeSMTP NotifierType = "smtp"
|
||||
NotifierTypeSMTP NotifierType = "邮件"
|
||||
// NotifierTypeWeChat 表示企业微信通知器。
|
||||
NotifierTypeWeChat NotifierType = "wechat"
|
||||
NotifierTypeWeChat NotifierType = "企业微信"
|
||||
// NotifierTypeLark 表示飞书通知器。
|
||||
NotifierTypeLark NotifierType = "lark"
|
||||
NotifierTypeLark NotifierType = "飞书"
|
||||
// NotifierTypeLog 表示日志通知器,作为最终的告警记录渠道。
|
||||
NotifierTypeLog NotifierType = "log"
|
||||
NotifierTypeLog NotifierType = "日志"
|
||||
)
|
||||
|
||||
// AlarmContent 定义了通知的内容
|
||||
|
||||
Reference in New Issue
Block a user