Files
EdgeCommon/pkg/nodeconfigs/http_cc_policy.go

23 lines
564 B
Go
Raw Permalink Normal View History

2024-07-27 13:29:26 +08:00
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
2023-05-23 19:16:09 +08:00
//go:build !plus
package nodeconfigs
2023-05-23 19:51:28 +08:00
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
2023-05-23 19:16:09 +08:00
// HTTPCCPolicy CC策略
type HTTPCCPolicy struct {
2023-05-23 19:51:28 +08:00
IsOn bool `json:"isOn" yaml:"isOn"`
Thresholds []*serverconfigs.HTTPCCThreshold `json:"thresholds" yaml:"thresholds"` // 阈值
2023-05-23 19:16:09 +08:00
}
func NewHTTPCCPolicy() *HTTPCCPolicy {
return &HTTPCCPolicy{
IsOn: true,
}
}
func (this *HTTPCCPolicy) Init() error {
return nil
}