feat: configurable traffic threshold and Feishu bot alerts

This commit is contained in:
Codex committed 2026-10-23 17:49:19 +08:00
1 parent 3e6e481b79
commit 1273f226fd
16 files changed
+660 -20

No files matched your search

+9
View File
@@ -291,6 +291,15 @@ type ClientSession struct {
CreatedAt time.Time `json:"created_at"`
}
// AlertSetting 平台级突发流量阈值与飞书群机器人配置(单例)。
type AlertSetting struct {
ID uint `gorm:"primaryKey" json:"-"`
RateThresholdMbps int `gorm:"default:50" json:"rate_threshold_mbps"`
Enabled bool `gorm:"default:false" json:"enabled"`
WebhookEncrypted string `gorm:"type:text" json:"-"`
SigningEncrypted string `gorm:"type:text" json:"-"`
}
// TrafficPolicy 流量配额与限速策略(挂在 Tunnel 上) // Logan.Li
type TrafficPolicy struct {
ID uint `gorm:"primaryKey" json:"id"`