mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 05:00:24 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			561 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			561 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
 | 
						|
//go:build !plus
 | 
						|
 | 
						|
package nodeconfigs
 | 
						|
 | 
						|
import "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
 | 
						|
 | 
						|
// HTTPCCPolicy CC策略
 | 
						|
type HTTPCCPolicy struct {
 | 
						|
	IsOn       bool                             `json:"isOn" yaml:"isOn"`
 | 
						|
	Thresholds []*serverconfigs.HTTPCCThreshold `json:"thresholds" yaml:"thresholds"` // 阈值
 | 
						|
}
 | 
						|
 | 
						|
func NewHTTPCCPolicy() *HTTPCCPolicy {
 | 
						|
	return &HTTPCCPolicy{
 | 
						|
		IsOn: true,
 | 
						|
	}
 | 
						|
}
 | 
						|
 | 
						|
func (this *HTTPCCPolicy) Init() error {
 | 
						|
	return nil
 | 
						|
}
 |