套餐可以设置带宽限制

This commit is contained in:
GoEdgeLab
2024-01-11 15:22:37 +08:00
parent 75b26b08a5
commit f6a78ae680
13 changed files with 667 additions and 281 deletions

View File

@@ -29,6 +29,10 @@ type TrafficLimitConfig struct {
NoticePageBody string `yaml:"noticePageBody" json:"noticePageBody"` // 超出限制时的提醒,支持请求变量
}
func (this *TrafficLimitConfig) Init() error {
return nil
}
// DailyBytes 每天限制
// 不使用Init()来初始化数据是为了让其他地方不经过Init()也能得到计算值
func (this *TrafficLimitConfig) DailyBytes() int64 {