Documentation ¶
Index ¶
- Constants
- func ToLocalRateLimitDescriptor(rule *policyv1alpha1.RateLimitRule) *commonratelimitv3.LocalRateLimitDescriptor
- func ToRateLimitAction(match *policyv1alpha1.RateLimitMatch) *routev3.RateLimit_Action
- func ToTokenBucket(policy *policyv1alpha1.RatelimitPolicy) *typev3.TokenBucket
- type Converter
- type LocalConverter
- func (conv *LocalConverter) ToAction(match *policyv1alpha1.RateLimitMatch) *routev3.RateLimit_Action
- func (conv *LocalConverter) ToDescriptor(rule *policyv1alpha1.RateLimitRule) *commonratelimitv3.LocalRateLimitDescriptor
- func (conv *LocalConverter) ToTokenBucket(policy *policyv1alpha1.RatelimitPolicy) *typev3.TokenBucket
Constants ¶
View Source
const ( Url actionType = iota Header Method Source )
Variables ¶
This section is empty.
Functions ¶
func ToLocalRateLimitDescriptor ¶
func ToLocalRateLimitDescriptor(rule *policyv1alpha1.RateLimitRule) *commonratelimitv3.LocalRateLimitDescriptor
func ToRateLimitAction ¶
func ToRateLimitAction(match *policyv1alpha1.RateLimitMatch) *routev3.RateLimit_Action
func ToTokenBucket ¶
func ToTokenBucket(policy *policyv1alpha1.RatelimitPolicy) *typev3.TokenBucket
Types ¶
type Converter ¶
type Converter interface { ToTokenBucket(policy *policyv1alpha1.RatelimitPolicy) *typev3.TokenBucket ToAction(match *policyv1alpha1.RateLimitMatch) *routev3.RateLimit_Action ToDescriptor(rule *policyv1alpha1.RateLimitRule) *commonratelimitv3.LocalRateLimitDescriptor }
func NewLocalConverter ¶
func NewLocalConverter() Converter
type LocalConverter ¶
type LocalConverter struct {
// contains filtered or unexported fields
}
func (*LocalConverter) ToAction ¶
func (conv *LocalConverter) ToAction(match *policyv1alpha1.RateLimitMatch) *routev3.RateLimit_Action
func (*LocalConverter) ToDescriptor ¶
func (conv *LocalConverter) ToDescriptor(rule *policyv1alpha1.RateLimitRule) *commonratelimitv3.LocalRateLimitDescriptor
func (*LocalConverter) ToTokenBucket ¶
func (conv *LocalConverter) ToTokenBucket(policy *policyv1alpha1.RatelimitPolicy) *typev3.TokenBucket
Click to show internal directories.
Click to hide internal directories.