Documentation ¶
Index ¶
- Variables
- type GatewayRateLimit
- func (*GatewayRateLimit) Descriptor() ([]byte, []int)deprecated
- func (m *GatewayRateLimit) Equal(that interface{}) bool
- func (x *GatewayRateLimit) GetDenyOnFail() bool
- func (x *GatewayRateLimit) GetRateLimitBeforeAuth() bool
- func (x *GatewayRateLimit) GetRatelimitServerRef() *v1.ObjectRef
- func (x *GatewayRateLimit) GetRequestTimeout() *duration.Duration
- func (*GatewayRateLimit) ProtoMessage()
- func (x *GatewayRateLimit) ProtoReflect() protoreflect.Message
- func (x *GatewayRateLimit) Reset()
- func (x *GatewayRateLimit) String() string
- type RouteRateLimit
- func (*RouteRateLimit) Descriptor() ([]byte, []int)deprecated
- func (m *RouteRateLimit) Equal(that interface{}) bool
- func (x *RouteRateLimit) GetAdvanced() *RouteRateLimit_AdvancedRateLimit
- func (x *RouteRateLimit) GetBasic() *RouteRateLimit_BasicRateLimit
- func (x *RouteRateLimit) GetConfigRefs() *v1.ObjectRefList
- func (m *RouteRateLimit) GetRateLimitConfigType() isRouteRateLimit_RateLimitConfigType
- func (*RouteRateLimit) ProtoMessage()
- func (x *RouteRateLimit) ProtoReflect() protoreflect.Message
- func (x *RouteRateLimit) Reset()
- func (x *RouteRateLimit) String() string
- type RouteRateLimit_Advanced
- type RouteRateLimit_AdvancedRateLimit
- func (*RouteRateLimit_AdvancedRateLimit) Descriptor() ([]byte, []int)deprecated
- func (m *RouteRateLimit_AdvancedRateLimit) Equal(that interface{}) bool
- func (x *RouteRateLimit_AdvancedRateLimit) GetActions() []*RouteRateLimit_AdvancedRateLimit_RateLimitActions
- func (*RouteRateLimit_AdvancedRateLimit) ProtoMessage()
- func (x *RouteRateLimit_AdvancedRateLimit) ProtoReflect() protoreflect.Message
- func (x *RouteRateLimit_AdvancedRateLimit) Reset()
- func (x *RouteRateLimit_AdvancedRateLimit) String() string
- type RouteRateLimit_AdvancedRateLimit_RateLimitActions
- func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) Descriptor() ([]byte, []int)deprecated
- func (m *RouteRateLimit_AdvancedRateLimit_RateLimitActions) Equal(that interface{}) bool
- func (x *RouteRateLimit_AdvancedRateLimit_RateLimitActions) GetActions() []*v1alpha1.Action
- func (x *RouteRateLimit_AdvancedRateLimit_RateLimitActions) GetSetActions() []*v1alpha1.Action
- func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) ProtoMessage()
- func (x *RouteRateLimit_AdvancedRateLimit_RateLimitActions) ProtoReflect() protoreflect.Message
- func (x *RouteRateLimit_AdvancedRateLimit_RateLimitActions) Reset()
- func (x *RouteRateLimit_AdvancedRateLimit_RateLimitActions) String() string
- type RouteRateLimit_Basic
- type RouteRateLimit_BasicRateLimit
- func (*RouteRateLimit_BasicRateLimit) Descriptor() ([]byte, []int)deprecated
- func (m *RouteRateLimit_BasicRateLimit) Equal(that interface{}) bool
- func (x *RouteRateLimit_BasicRateLimit) GetAnonymousLimits() *RouteRateLimit_BasicRateLimit_RateLimitRatio
- func (x *RouteRateLimit_BasicRateLimit) GetAuthorizedLimits() *RouteRateLimit_BasicRateLimit_RateLimitRatio
- func (*RouteRateLimit_BasicRateLimit) ProtoMessage()
- func (x *RouteRateLimit_BasicRateLimit) ProtoReflect() protoreflect.Message
- func (x *RouteRateLimit_BasicRateLimit) Reset()
- func (x *RouteRateLimit_BasicRateLimit) String() string
- type RouteRateLimit_BasicRateLimit_RateLimitRatio
- func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) Descriptor() ([]byte, []int)deprecated
- func (m *RouteRateLimit_BasicRateLimit_RateLimitRatio) Equal(that interface{}) bool
- func (x *RouteRateLimit_BasicRateLimit_RateLimitRatio) GetRequestsPerUnit() uint32
- func (x *RouteRateLimit_BasicRateLimit_RateLimitRatio) GetUnit() RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit
- func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) ProtoMessage()
- func (x *RouteRateLimit_BasicRateLimit_RateLimitRatio) ProtoReflect() protoreflect.Message
- func (x *RouteRateLimit_BasicRateLimit_RateLimitRatio) Reset()
- func (x *RouteRateLimit_BasicRateLimit_RateLimitRatio) String() string
- type RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit
- func (RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) Descriptor() protoreflect.EnumDescriptor
- func (x RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) Enum() *RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit
- func (RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) EnumDescriptor() ([]byte, []int)deprecated
- func (x RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) Number() protoreflect.EnumNumber
- func (x RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) String() string
- func (RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) Type() protoreflect.EnumType
- type RouteRateLimit_ConfigRefs
Constants ¶
This section is empty.
Variables ¶
var ( RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit_name = map[int32]string{ 0: "UNKNOWN", 1: "SECOND", 2: "MINUTE", 3: "HOUR", 4: "DAY", } RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit_value = map[string]int32{ "UNKNOWN": 0, "SECOND": 1, "MINUTE": 2, "HOUR": 3, "DAY": 4, } )
Enum value maps for RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit.
var File_github_com_solo_io_gloo_mesh_api_networking_v1_ratelimit_rate_limit_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type GatewayRateLimit ¶
type GatewayRateLimit struct { RatelimitServerRef *v1.ObjectRef `protobuf:"bytes,1,opt,name=ratelimit_server_ref,json=ratelimitServerRef,proto3" json:"ratelimit_server_ref,omitempty"` RequestTimeout *duration.Duration `protobuf:"bytes,2,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` DenyOnFail bool `protobuf:"varint,3,opt,name=deny_on_fail,json=denyOnFail,proto3" json:"deny_on_fail,omitempty"` // Set this is set to true if you would like to rate limit traffic before applying external auth to it. // *Note*: When this is true, you will lose some features like being able to rate limit a request based on its auth state RateLimitBeforeAuth bool `protobuf:"varint,9,opt,name=rate_limit_before_auth,json=rateLimitBeforeAuth,proto3" json:"rate_limit_before_auth,omitempty"` // contains filtered or unexported fields }
Configure the Rate-Limit Filter on a Gateway
func (*GatewayRateLimit) Descriptor
deprecated
func (*GatewayRateLimit) Descriptor() ([]byte, []int)
Deprecated: Use GatewayRateLimit.ProtoReflect.Descriptor instead.
func (*GatewayRateLimit) Equal ¶
func (m *GatewayRateLimit) Equal(that interface{}) bool
Equal function
func (*GatewayRateLimit) GetDenyOnFail ¶
func (x *GatewayRateLimit) GetDenyOnFail() bool
func (*GatewayRateLimit) GetRateLimitBeforeAuth ¶
func (x *GatewayRateLimit) GetRateLimitBeforeAuth() bool
func (*GatewayRateLimit) GetRatelimitServerRef ¶
func (x *GatewayRateLimit) GetRatelimitServerRef() *v1.ObjectRef
func (*GatewayRateLimit) GetRequestTimeout ¶
func (x *GatewayRateLimit) GetRequestTimeout() *duration.Duration
func (*GatewayRateLimit) ProtoMessage ¶
func (*GatewayRateLimit) ProtoMessage()
func (*GatewayRateLimit) ProtoReflect ¶
func (x *GatewayRateLimit) ProtoReflect() protoreflect.Message
func (*GatewayRateLimit) Reset ¶
func (x *GatewayRateLimit) Reset()
func (*GatewayRateLimit) String ¶
func (x *GatewayRateLimit) String() string
type RouteRateLimit ¶
type RouteRateLimit struct { // Types that are assignable to RateLimitConfigType: // *RouteRateLimit_Basic // *RouteRateLimit_Advanced // *RouteRateLimit_ConfigRefs RateLimitConfigType isRouteRateLimit_RateLimitConfigType `protobuf_oneof:"rate_limit_config_type"` // contains filtered or unexported fields }
Rate limit configuration for a Route or TrafficPolicy. Configures rate limits for individual HTTP routes
func (*RouteRateLimit) Descriptor
deprecated
func (*RouteRateLimit) Descriptor() ([]byte, []int)
Deprecated: Use RouteRateLimit.ProtoReflect.Descriptor instead.
func (*RouteRateLimit) GetAdvanced ¶
func (x *RouteRateLimit) GetAdvanced() *RouteRateLimit_AdvancedRateLimit
func (*RouteRateLimit) GetBasic ¶
func (x *RouteRateLimit) GetBasic() *RouteRateLimit_BasicRateLimit
func (*RouteRateLimit) GetConfigRefs ¶
func (x *RouteRateLimit) GetConfigRefs() *v1.ObjectRefList
func (*RouteRateLimit) GetRateLimitConfigType ¶
func (m *RouteRateLimit) GetRateLimitConfigType() isRouteRateLimit_RateLimitConfigType
func (*RouteRateLimit) ProtoMessage ¶
func (*RouteRateLimit) ProtoMessage()
func (*RouteRateLimit) ProtoReflect ¶
func (x *RouteRateLimit) ProtoReflect() protoreflect.Message
func (*RouteRateLimit) Reset ¶
func (x *RouteRateLimit) Reset()
func (*RouteRateLimit) String ¶
func (x *RouteRateLimit) String() string
type RouteRateLimit_Advanced ¶
type RouteRateLimit_Advanced struct { // Partial config for GlooE rate-limiting based on Envoy's rate-limit service; // supports Envoy's rate-limit service API. (reference here: https://github.com/lyft/ratelimit#configuration) // Configure rate-limit *actions* here, which define how request characteristics get translated into // descriptors used by the rate-limit service for rate-limiting. Configure rate-limit *descriptors* and // their associated limits on the Gloo settings. // Only one of `ratelimit` or `rate_limit_configs` can be set. Advanced *RouteRateLimit_AdvancedRateLimit `protobuf:"bytes,2,opt,name=advanced,proto3,oneof"` }
type RouteRateLimit_AdvancedRateLimit ¶
type RouteRateLimit_AdvancedRateLimit struct { // Define individual rate limits here. Each rate limit will be evaluated, if any rate limit // would be throttled, the entire request returns a 429 (gets throttled) Actions []*RouteRateLimit_AdvancedRateLimit_RateLimitActions `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` // contains filtered or unexported fields }
Use this field if you want to inline the Envoy rate limits for this VirtualHost. Note that this does not configure the rate limit server. If you are running Gloo Enterprise, you need to specify the server configuration via the appropriate field in the Gloo `Settings` resource. If you are running a custom rate limit server you need to configure it yourself.
func (*RouteRateLimit_AdvancedRateLimit) Descriptor
deprecated
func (*RouteRateLimit_AdvancedRateLimit) Descriptor() ([]byte, []int)
Deprecated: Use RouteRateLimit_AdvancedRateLimit.ProtoReflect.Descriptor instead.
func (*RouteRateLimit_AdvancedRateLimit) Equal ¶
func (m *RouteRateLimit_AdvancedRateLimit) Equal(that interface{}) bool
Equal function
func (*RouteRateLimit_AdvancedRateLimit) GetActions ¶
func (x *RouteRateLimit_AdvancedRateLimit) GetActions() []*RouteRateLimit_AdvancedRateLimit_RateLimitActions
func (*RouteRateLimit_AdvancedRateLimit) ProtoMessage ¶
func (*RouteRateLimit_AdvancedRateLimit) ProtoMessage()
func (*RouteRateLimit_AdvancedRateLimit) ProtoReflect ¶
func (x *RouteRateLimit_AdvancedRateLimit) ProtoReflect() protoreflect.Message
func (*RouteRateLimit_AdvancedRateLimit) Reset ¶
func (x *RouteRateLimit_AdvancedRateLimit) Reset()
func (*RouteRateLimit_AdvancedRateLimit) String ¶
func (x *RouteRateLimit_AdvancedRateLimit) String() string
type RouteRateLimit_AdvancedRateLimit_RateLimitActions ¶
type RouteRateLimit_AdvancedRateLimit_RateLimitActions struct { // TODO: come up with descriptive names and comments for these fields Actions []*v1alpha1.Action `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` SetActions []*v1alpha1.Action `protobuf:"bytes,2,rep,name=set_actions,json=setActions,proto3" json:"set_actions,omitempty"` // contains filtered or unexported fields }
Each action and setAction in the lists maps part of the request (or its context) to a descriptor. The tuple or set of descriptors generated by the provided actions is sent to the rate limit server and matched against rate limit rules. Order matters on provided actions but not on setActions, e.g. the following actions: - actions:
- requestHeaders: descriptorKey: account_id headerName: x-account-id
- requestHeaders: descriptorKey: plan headerName: x-plan
define an ordered descriptor tuple like so: ('account_id', '<x-account-id value>'), ('plan', '<x-plan value>')
While the current form matches, the same tuple in reverse order would not match the following descriptor:
descriptors:
- key: account_id descriptors:
- key: plan value: BASIC rateLimit: requestsPerUnit: 1 unit: MINUTE
- key: plan value: PLUS rateLimit: requestsPerUnit: 20 unit: MINUTE
Similarly, the following setActions: - setActions:
- requestHeaders: descriptorKey: account_id headerName: x-account-id
- requestHeaders: descriptorKey: plan headerName: x-plan
define an unordered descriptor set like so: {('account_id', '<x-account-id value>'), ('plan', '<x-plan value>')}
This set would match the following setDescriptor:
setDescriptors: - simpleDescriptors:
- key: plan value: BASIC
- key: account_id rateLimit: requestsPerUnit: 20 unit: MINUTE
It would also match the following setDescriptor which includes only a subset of the setActions enumerated:
setDescriptors: - simpleDescriptors:
- key: account_id rateLimit: requestsPerUnit: 20 unit: MINUTE
It would even match the following setDescriptor. Any setActions list would match this setDescriptor which has simpleDescriptors omitted entirely:
setDescriptors:
- rateLimit: requestsPerUnit: 20 unit: MINUTE
func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) Descriptor
deprecated
func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) Descriptor() ([]byte, []int)
Deprecated: Use RouteRateLimit_AdvancedRateLimit_RateLimitActions.ProtoReflect.Descriptor instead.
func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) Equal ¶
func (m *RouteRateLimit_AdvancedRateLimit_RateLimitActions) Equal(that interface{}) bool
Equal function
func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) GetActions ¶
func (x *RouteRateLimit_AdvancedRateLimit_RateLimitActions) GetActions() []*v1alpha1.Action
func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) GetSetActions ¶
func (x *RouteRateLimit_AdvancedRateLimit_RateLimitActions) GetSetActions() []*v1alpha1.Action
func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) ProtoMessage ¶
func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) ProtoMessage()
func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) ProtoReflect ¶
func (x *RouteRateLimit_AdvancedRateLimit_RateLimitActions) ProtoReflect() protoreflect.Message
func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) Reset ¶
func (x *RouteRateLimit_AdvancedRateLimit_RateLimitActions) Reset()
func (*RouteRateLimit_AdvancedRateLimit_RateLimitActions) String ¶
func (x *RouteRateLimit_AdvancedRateLimit_RateLimitActions) String() string
type RouteRateLimit_Basic ¶
type RouteRateLimit_Basic struct { // Config for rate-limiting using simplified (gloo-specific) API Basic *RouteRateLimit_BasicRateLimit `protobuf:"bytes,1,opt,name=basic,proto3,oneof"` }
type RouteRateLimit_BasicRateLimit ¶
type RouteRateLimit_BasicRateLimit struct { // limits for authorized users AuthorizedLimits *RouteRateLimit_BasicRateLimit_RateLimitRatio `protobuf:"bytes,1,opt,name=authorized_limits,json=authorizedLimits,proto3" json:"authorized_limits,omitempty"` // limits for unauthorized users AnonymousLimits *RouteRateLimit_BasicRateLimit_RateLimitRatio `protobuf:"bytes,2,opt,name=anonymous_limits,json=anonymousLimits,proto3" json:"anonymous_limits,omitempty"` // contains filtered or unexported fields }
Basic rate-limiting API
func (*RouteRateLimit_BasicRateLimit) Descriptor
deprecated
func (*RouteRateLimit_BasicRateLimit) Descriptor() ([]byte, []int)
Deprecated: Use RouteRateLimit_BasicRateLimit.ProtoReflect.Descriptor instead.
func (*RouteRateLimit_BasicRateLimit) Equal ¶
func (m *RouteRateLimit_BasicRateLimit) Equal(that interface{}) bool
Equal function
func (*RouteRateLimit_BasicRateLimit) GetAnonymousLimits ¶
func (x *RouteRateLimit_BasicRateLimit) GetAnonymousLimits() *RouteRateLimit_BasicRateLimit_RateLimitRatio
func (*RouteRateLimit_BasicRateLimit) GetAuthorizedLimits ¶
func (x *RouteRateLimit_BasicRateLimit) GetAuthorizedLimits() *RouteRateLimit_BasicRateLimit_RateLimitRatio
func (*RouteRateLimit_BasicRateLimit) ProtoMessage ¶
func (*RouteRateLimit_BasicRateLimit) ProtoMessage()
func (*RouteRateLimit_BasicRateLimit) ProtoReflect ¶
func (x *RouteRateLimit_BasicRateLimit) ProtoReflect() protoreflect.Message
func (*RouteRateLimit_BasicRateLimit) Reset ¶
func (x *RouteRateLimit_BasicRateLimit) Reset()
func (*RouteRateLimit_BasicRateLimit) String ¶
func (x *RouteRateLimit_BasicRateLimit) String() string
type RouteRateLimit_BasicRateLimit_RateLimitRatio ¶
type RouteRateLimit_BasicRateLimit_RateLimitRatio struct { Unit RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit `` /* 156-byte string literal not displayed */ RequestsPerUnit uint32 `protobuf:"varint,2,opt,name=requests_per_unit,json=requestsPerUnit,proto3" json:"requests_per_unit,omitempty"` // contains filtered or unexported fields }
A `RateLimitRatio` specifies the actual ratio of requests that will be permitted when there is a match.
func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) Descriptor
deprecated
func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) Descriptor() ([]byte, []int)
Deprecated: Use RouteRateLimit_BasicRateLimit_RateLimitRatio.ProtoReflect.Descriptor instead.
func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) Equal ¶
func (m *RouteRateLimit_BasicRateLimit_RateLimitRatio) Equal(that interface{}) bool
Equal function
func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) GetRequestsPerUnit ¶
func (x *RouteRateLimit_BasicRateLimit_RateLimitRatio) GetRequestsPerUnit() uint32
func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) ProtoMessage ¶
func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) ProtoMessage()
func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) ProtoReflect ¶
func (x *RouteRateLimit_BasicRateLimit_RateLimitRatio) ProtoReflect() protoreflect.Message
func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) Reset ¶
func (x *RouteRateLimit_BasicRateLimit_RateLimitRatio) Reset()
func (*RouteRateLimit_BasicRateLimit_RateLimitRatio) String ¶
func (x *RouteRateLimit_BasicRateLimit_RateLimitRatio) String() string
type RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit ¶
type RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit int32
const ( RouteRateLimit_BasicRateLimit_RateLimitRatio_UNKNOWN RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit = 0 RouteRateLimit_BasicRateLimit_RateLimitRatio_SECOND RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit = 1 RouteRateLimit_BasicRateLimit_RateLimitRatio_MINUTE RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit = 2 RouteRateLimit_BasicRateLimit_RateLimitRatio_HOUR RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit = 3 RouteRateLimit_BasicRateLimit_RateLimitRatio_DAY RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit = 4 )
func (RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) Descriptor ¶
func (RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) Descriptor() protoreflect.EnumDescriptor
func (RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) EnumDescriptor
deprecated
func (RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) EnumDescriptor() ([]byte, []int)
Deprecated: Use RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit.Descriptor instead.
func (RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) Number ¶
func (x RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) Number() protoreflect.EnumNumber
func (RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) String ¶
func (x RouteRateLimit_BasicRateLimit_RateLimitRatio_Unit) String() string
type RouteRateLimit_ConfigRefs ¶
type RouteRateLimit_ConfigRefs struct { // References to RateLimitConfig resources. This is used to configure the GlooE rate limit server. // Only one of `ratelimit` or `rate_limit_configs` can be set. ConfigRefs *v1.ObjectRefList `protobuf:"bytes,3,opt,name=config_refs,json=configRefs,proto3,oneof"` }