mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 20:40:25 +08:00
优化代码
This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
|
||||
package nodeconfigs
|
||||
|
||||
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
|
||||
|
||||
// HTTPCCPolicy CC策略
|
||||
type HTTPCCPolicy struct {
|
||||
IsOn bool `json:"isOn" yaml:"isOn"`
|
||||
IsOn bool `json:"isOn" yaml:"isOn"`
|
||||
Thresholds []*serverconfigs.HTTPCCThreshold `json:"thresholds" yaml:"thresholds"` // 阈值
|
||||
}
|
||||
|
||||
func NewHTTPCCPolicy() *HTTPCCPolicy {
|
||||
|
||||
@@ -3,6 +3,28 @@
|
||||
|
||||
package serverconfigs
|
||||
|
||||
type HTTPCCThreshold struct {
|
||||
// stub
|
||||
}
|
||||
|
||||
func NewHTTPCCThreshold() *HTTPCCThreshold {
|
||||
return &HTTPCCThreshold{}
|
||||
}
|
||||
|
||||
func (this *HTTPCCThreshold) Merge(threshold *HTTPCCThreshold) {
|
||||
// stub
|
||||
}
|
||||
|
||||
func (this *HTTPCCThreshold) MergeIfEmpty(threshold *HTTPCCThreshold) {
|
||||
// stub
|
||||
}
|
||||
|
||||
func (this *HTTPCCThreshold) Clone() *HTTPCCThreshold {
|
||||
return &HTTPCCThreshold{}
|
||||
}
|
||||
|
||||
var DefaultHTTPCCThresholds = []*HTTPCCThreshold{} // stub
|
||||
|
||||
// DefaultHTTPCCConfig 默认的CC配置
|
||||
func DefaultHTTPCCConfig() *HTTPCCConfig {
|
||||
return &HTTPCCConfig{}
|
||||
|
||||
Reference in New Issue
Block a user