Documentation ¶
Index ¶
- Variables
- type RateLimit
- func (*RateLimit) Descriptor() ([]byte, []int)deprecated
- func (x *RateLimit) GetDisableXEnvoyRatelimitedHeader() bool
- func (x *RateLimit) GetDomain() string
- func (x *RateLimit) GetEnableXRatelimitHeaders() RateLimit_XRateLimitHeadersRFCVersion
- func (x *RateLimit) GetFailureModeDeny() bool
- func (x *RateLimit) GetRateLimitService() *v4alpha.RateLimitServiceConfig
- func (x *RateLimit) GetRateLimitedAsResourceExhausted() bool
- func (x *RateLimit) GetRequestType() string
- func (x *RateLimit) GetStage() uint32
- func (x *RateLimit) GetTimeout() *duration.Duration
- func (*RateLimit) ProtoMessage()
- func (x *RateLimit) ProtoReflect() protoreflect.Message
- func (x *RateLimit) Reset()
- func (x *RateLimit) String() string
- func (m *RateLimit) Validate() error
- type RateLimitPerRoute
- func (*RateLimitPerRoute) Descriptor() ([]byte, []int)deprecated
- func (x *RateLimitPerRoute) GetVhRateLimits() RateLimitPerRoute_VhRateLimitsOptions
- func (*RateLimitPerRoute) ProtoMessage()
- func (x *RateLimitPerRoute) ProtoReflect() protoreflect.Message
- func (x *RateLimitPerRoute) Reset()
- func (x *RateLimitPerRoute) String() string
- func (m *RateLimitPerRoute) Validate() error
- type RateLimitPerRouteValidationError
- func (e RateLimitPerRouteValidationError) Cause() error
- func (e RateLimitPerRouteValidationError) Error() string
- func (e RateLimitPerRouteValidationError) ErrorName() string
- func (e RateLimitPerRouteValidationError) Field() string
- func (e RateLimitPerRouteValidationError) Key() bool
- func (e RateLimitPerRouteValidationError) Reason() string
- type RateLimitPerRoute_VhRateLimitsOptions
- func (RateLimitPerRoute_VhRateLimitsOptions) Descriptor() protoreflect.EnumDescriptor
- func (x RateLimitPerRoute_VhRateLimitsOptions) Enum() *RateLimitPerRoute_VhRateLimitsOptions
- func (RateLimitPerRoute_VhRateLimitsOptions) EnumDescriptor() ([]byte, []int)deprecated
- func (x RateLimitPerRoute_VhRateLimitsOptions) Number() protoreflect.EnumNumber
- func (x RateLimitPerRoute_VhRateLimitsOptions) String() string
- func (RateLimitPerRoute_VhRateLimitsOptions) Type() protoreflect.EnumType
- type RateLimitValidationError
- type RateLimit_XRateLimitHeadersRFCVersion
- func (RateLimit_XRateLimitHeadersRFCVersion) Descriptor() protoreflect.EnumDescriptor
- func (x RateLimit_XRateLimitHeadersRFCVersion) Enum() *RateLimit_XRateLimitHeadersRFCVersion
- func (RateLimit_XRateLimitHeadersRFCVersion) EnumDescriptor() ([]byte, []int)deprecated
- func (x RateLimit_XRateLimitHeadersRFCVersion) Number() protoreflect.EnumNumber
- func (x RateLimit_XRateLimitHeadersRFCVersion) String() string
- func (RateLimit_XRateLimitHeadersRFCVersion) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( RateLimit_XRateLimitHeadersRFCVersion_name = map[int32]string{ 0: "OFF", 1: "DRAFT_VERSION_03", } RateLimit_XRateLimitHeadersRFCVersion_value = map[string]int32{ "OFF": 0, "DRAFT_VERSION_03": 1, } )
Enum value maps for RateLimit_XRateLimitHeadersRFCVersion.
var ( RateLimitPerRoute_VhRateLimitsOptions_name = map[int32]string{ 0: "OVERRIDE", 1: "INCLUDE", 2: "IGNORE", } RateLimitPerRoute_VhRateLimitsOptions_value = map[string]int32{ "OVERRIDE": 0, "INCLUDE": 1, "IGNORE": 2, } )
Enum value maps for RateLimitPerRoute_VhRateLimitsOptions.
var File_envoy_extensions_filters_http_ratelimit_v4alpha_rate_limit_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type RateLimit ¶
type RateLimit struct { // The rate limit domain to use when calling the rate limit service. Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"` // Specifies the rate limit configurations to be applied with the same // stage number. If not set, the default stage number is 0. // // .. note:: // // The filter supports a range of 0 - 10 inclusively for stage numbers. Stage uint32 `protobuf:"varint,2,opt,name=stage,proto3" json:"stage,omitempty"` // The type of requests the filter should apply to. The supported // types are *internal*, *external* or *both*. A request is considered internal if // :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is set to true. If // :ref:`x-envoy-internal<config_http_conn_man_headers_x-envoy-internal>` is not set or false, a // request is considered external. The filter defaults to *both*, and it will apply to all request // types. RequestType string `protobuf:"bytes,3,opt,name=request_type,json=requestType,proto3" json:"request_type,omitempty"` // The timeout in milliseconds for the rate limit service RPC. If not // set, this defaults to 20ms. Timeout *duration.Duration `protobuf:"bytes,4,opt,name=timeout,proto3" json:"timeout,omitempty"` // The filter's behaviour in case the rate limiting service does // not respond back. When it is set to true, Envoy will not allow traffic in case of // communication failure between rate limiting service and the proxy. FailureModeDeny bool `protobuf:"varint,5,opt,name=failure_mode_deny,json=failureModeDeny,proto3" json:"failure_mode_deny,omitempty"` // Specifies whether a `RESOURCE_EXHAUSTED` gRPC code must be returned instead // of the default `UNAVAILABLE` gRPC code for a rate limited gRPC call. The // HTTP code will be 200 for a gRPC response. RateLimitedAsResourceExhausted bool `` /* 158-byte string literal not displayed */ // Configuration for an external rate limit service provider. If not // specified, any calls to the rate limit service will immediately return // success. RateLimitService *v4alpha.RateLimitServiceConfig `protobuf:"bytes,7,opt,name=rate_limit_service,json=rateLimitService,proto3" json:"rate_limit_service,omitempty"` // Defines the standard version to use for X-RateLimit headers emitted by the filter: // // * “X-RateLimit-Limit“ - indicates the request-quota associated to the // client in the current time-window followed by the description of the // quota policy. The values are returned by the rate limiting service in // :ref:`current_limit<envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.DescriptorStatus.current_limit>` // field. Example: `10, 10;w=1;name="per-ip", 1000;w=3600`. // * “X-RateLimit-Remaining“ - indicates the remaining requests in the // current time-window. The values are returned by the rate limiting service // in :ref:`limit_remaining<envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.DescriptorStatus.limit_remaining>` // field. // * “X-RateLimit-Reset“ - indicates the number of seconds until reset of // the current time-window. The values are returned by the rate limiting service // in :ref:`duration_until_reset<envoy_v3_api_field_service.ratelimit.v3.RateLimitResponse.DescriptorStatus.duration_until_reset>` // field. // // In case rate limiting policy specifies more then one time window, the values // above represent the window that is closest to reaching its limit. // // For more information about the headers specification see selected version of // the `draft RFC <https://tools.ietf.org/id/draft-polli-ratelimit-headers-03.html>`_. // // Disabled by default. EnableXRatelimitHeaders RateLimit_XRateLimitHeadersRFCVersion `` /* 226-byte string literal not displayed */ // Disables emitting the :ref:`x-envoy-ratelimited<config_http_filters_router_x-envoy-ratelimited>` header // in case of rate limiting (i.e. 429 responses). // Having this header not present potentially makes the request retriable. DisableXEnvoyRatelimitedHeader bool `` /* 158-byte string literal not displayed */ // contains filtered or unexported fields }
[#next-free-field: 10]
func (*RateLimit) Descriptor
deprecated
func (*RateLimit) GetDisableXEnvoyRatelimitedHeader ¶
func (*RateLimit) GetEnableXRatelimitHeaders ¶
func (x *RateLimit) GetEnableXRatelimitHeaders() RateLimit_XRateLimitHeadersRFCVersion
func (*RateLimit) GetFailureModeDeny ¶
func (*RateLimit) GetRateLimitService ¶
func (x *RateLimit) GetRateLimitService() *v4alpha.RateLimitServiceConfig
func (*RateLimit) GetRateLimitedAsResourceExhausted ¶
func (*RateLimit) GetRequestType ¶
func (*RateLimit) GetTimeout ¶
func (*RateLimit) ProtoMessage ¶
func (*RateLimit) ProtoMessage()
func (*RateLimit) ProtoReflect ¶
func (x *RateLimit) ProtoReflect() protoreflect.Message
type RateLimitPerRoute ¶
type RateLimitPerRoute struct { // Specifies if the rate limit filter should include the virtual host rate limits. VhRateLimits RateLimitPerRoute_VhRateLimitsOptions `` /* 191-byte string literal not displayed */ // contains filtered or unexported fields }
func (*RateLimitPerRoute) Descriptor
deprecated
func (*RateLimitPerRoute) Descriptor() ([]byte, []int)
Deprecated: Use RateLimitPerRoute.ProtoReflect.Descriptor instead.
func (*RateLimitPerRoute) GetVhRateLimits ¶
func (x *RateLimitPerRoute) GetVhRateLimits() RateLimitPerRoute_VhRateLimitsOptions
func (*RateLimitPerRoute) ProtoMessage ¶
func (*RateLimitPerRoute) ProtoMessage()
func (*RateLimitPerRoute) ProtoReflect ¶
func (x *RateLimitPerRoute) ProtoReflect() protoreflect.Message
func (*RateLimitPerRoute) Reset ¶
func (x *RateLimitPerRoute) Reset()
func (*RateLimitPerRoute) String ¶
func (x *RateLimitPerRoute) String() string
func (*RateLimitPerRoute) Validate ¶
func (m *RateLimitPerRoute) Validate() error
Validate checks the field values on RateLimitPerRoute with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type RateLimitPerRouteValidationError ¶
type RateLimitPerRouteValidationError struct {
// contains filtered or unexported fields
}
RateLimitPerRouteValidationError is the validation error returned by RateLimitPerRoute.Validate if the designated constraints aren't met.
func (RateLimitPerRouteValidationError) Cause ¶
func (e RateLimitPerRouteValidationError) Cause() error
Cause function returns cause value.
func (RateLimitPerRouteValidationError) Error ¶
func (e RateLimitPerRouteValidationError) Error() string
Error satisfies the builtin error interface
func (RateLimitPerRouteValidationError) ErrorName ¶
func (e RateLimitPerRouteValidationError) ErrorName() string
ErrorName returns error name.
func (RateLimitPerRouteValidationError) Field ¶
func (e RateLimitPerRouteValidationError) Field() string
Field function returns field value.
func (RateLimitPerRouteValidationError) Key ¶
func (e RateLimitPerRouteValidationError) Key() bool
Key function returns key value.
func (RateLimitPerRouteValidationError) Reason ¶
func (e RateLimitPerRouteValidationError) Reason() string
Reason function returns reason value.
type RateLimitPerRoute_VhRateLimitsOptions ¶
type RateLimitPerRoute_VhRateLimitsOptions int32
const ( // Use the virtual host rate limits unless the route has a rate limit policy. RateLimitPerRoute_OVERRIDE RateLimitPerRoute_VhRateLimitsOptions = 0 // Use the virtual host rate limits even if the route has a rate limit policy. RateLimitPerRoute_INCLUDE RateLimitPerRoute_VhRateLimitsOptions = 1 // Ignore the virtual host rate limits even if the route does not have a rate limit policy. RateLimitPerRoute_IGNORE RateLimitPerRoute_VhRateLimitsOptions = 2 )
func (RateLimitPerRoute_VhRateLimitsOptions) Descriptor ¶
func (RateLimitPerRoute_VhRateLimitsOptions) Descriptor() protoreflect.EnumDescriptor
func (RateLimitPerRoute_VhRateLimitsOptions) EnumDescriptor
deprecated
func (RateLimitPerRoute_VhRateLimitsOptions) EnumDescriptor() ([]byte, []int)
Deprecated: Use RateLimitPerRoute_VhRateLimitsOptions.Descriptor instead.
func (RateLimitPerRoute_VhRateLimitsOptions) Number ¶
func (x RateLimitPerRoute_VhRateLimitsOptions) Number() protoreflect.EnumNumber
func (RateLimitPerRoute_VhRateLimitsOptions) String ¶
func (x RateLimitPerRoute_VhRateLimitsOptions) String() string
func (RateLimitPerRoute_VhRateLimitsOptions) Type ¶
func (RateLimitPerRoute_VhRateLimitsOptions) Type() protoreflect.EnumType
type RateLimitValidationError ¶
type RateLimitValidationError struct {
// contains filtered or unexported fields
}
RateLimitValidationError is the validation error returned by RateLimit.Validate if the designated constraints aren't met.
func (RateLimitValidationError) Cause ¶
func (e RateLimitValidationError) Cause() error
Cause function returns cause value.
func (RateLimitValidationError) Error ¶
func (e RateLimitValidationError) Error() string
Error satisfies the builtin error interface
func (RateLimitValidationError) ErrorName ¶
func (e RateLimitValidationError) ErrorName() string
ErrorName returns error name.
func (RateLimitValidationError) Field ¶
func (e RateLimitValidationError) Field() string
Field function returns field value.
func (RateLimitValidationError) Key ¶
func (e RateLimitValidationError) Key() bool
Key function returns key value.
func (RateLimitValidationError) Reason ¶
func (e RateLimitValidationError) Reason() string
Reason function returns reason value.
type RateLimit_XRateLimitHeadersRFCVersion ¶
type RateLimit_XRateLimitHeadersRFCVersion int32
Defines the version of the standard to use for X-RateLimit headers.
const ( // X-RateLimit headers disabled. RateLimit_OFF RateLimit_XRateLimitHeadersRFCVersion = 0 // Use `draft RFC Version 03 <https://tools.ietf.org/id/draft-polli-ratelimit-headers-03.html>`_. RateLimit_DRAFT_VERSION_03 RateLimit_XRateLimitHeadersRFCVersion = 1 )
func (RateLimit_XRateLimitHeadersRFCVersion) Descriptor ¶
func (RateLimit_XRateLimitHeadersRFCVersion) Descriptor() protoreflect.EnumDescriptor
func (RateLimit_XRateLimitHeadersRFCVersion) EnumDescriptor
deprecated
func (RateLimit_XRateLimitHeadersRFCVersion) EnumDescriptor() ([]byte, []int)
Deprecated: Use RateLimit_XRateLimitHeadersRFCVersion.Descriptor instead.
func (RateLimit_XRateLimitHeadersRFCVersion) Number ¶
func (x RateLimit_XRateLimitHeadersRFCVersion) Number() protoreflect.EnumNumber
func (RateLimit_XRateLimitHeadersRFCVersion) String ¶
func (x RateLimit_XRateLimitHeadersRFCVersion) String() string
func (RateLimit_XRateLimitHeadersRFCVersion) Type ¶
func (RateLimit_XRateLimitHeadersRFCVersion) Type() protoreflect.EnumType