Interface LocalRateLimitOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
LocalRateLimit,LocalRateLimit.Builder
public interface LocalRateLimitOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LocalRateLimitDescriptorgetDescriptors(int index)The rate limit descriptor list to use in the local rate limit to override on.intgetDescriptorsCount()The rate limit descriptor list to use in the local rate limit to override on.List<LocalRateLimitDescriptor>getDescriptorsList()The rate limit descriptor list to use in the local rate limit to override on.LocalRateLimitDescriptorOrBuildergetDescriptorsOrBuilder(int index)The rate limit descriptor list to use in the local rate limit to override on.List<? extends LocalRateLimitDescriptorOrBuilder>getDescriptorsOrBuilderList()The rate limit descriptor list to use in the local rate limit to override on.XRateLimitHeadersRFCVersiongetEnableXRatelimitHeaders()Defines the standard version to use for X-RateLimit headers emitted by the filter.intgetEnableXRatelimitHeadersValue()Defines the standard version to use for X-RateLimit headers emitted by the filter.RuntimeFractionalPercentgetFilterEnabled()If set, this will enable -- but not necessarily enforce -- the rate limit for the given fraction of requests.RuntimeFractionalPercentOrBuildergetFilterEnabledOrBuilder()If set, this will enable -- but not necessarily enforce -- the rate limit for the given fraction of requests.RuntimeFractionalPercentgetFilterEnforced()If set, this will enforce the rate limit decisions for the given fraction of requests.RuntimeFractionalPercentOrBuildergetFilterEnforcedOrBuilder()If set, this will enforce the rate limit decisions for the given fraction of requests.booleangetLocalRateLimitPerDownstreamConnection()Specifies the scope of the rate limiter's token bucket.HeaderValueOptiongetRequestHeadersToAddWhenNotEnforced(int index)Specifies a list of HTTP headers that should be added to each request that has been rate limited and is also forwarded upstream.intgetRequestHeadersToAddWhenNotEnforcedCount()Specifies a list of HTTP headers that should be added to each request that has been rate limited and is also forwarded upstream.List<HeaderValueOption>getRequestHeadersToAddWhenNotEnforcedList()Specifies a list of HTTP headers that should be added to each request that has been rate limited and is also forwarded upstream.HeaderValueOptionOrBuildergetRequestHeadersToAddWhenNotEnforcedOrBuilder(int index)Specifies a list of HTTP headers that should be added to each request that has been rate limited and is also forwarded upstream.List<? extends HeaderValueOptionOrBuilder>getRequestHeadersToAddWhenNotEnforcedOrBuilderList()Specifies a list of HTTP headers that should be added to each request that has been rate limited and is also forwarded upstream.HeaderValueOptiongetResponseHeadersToAdd(int index)Specifies a list of HTTP headers that should be added to each response for requests that have been rate limited.intgetResponseHeadersToAddCount()Specifies a list of HTTP headers that should be added to each response for requests that have been rate limited.List<HeaderValueOption>getResponseHeadersToAddList()Specifies a list of HTTP headers that should be added to each response for requests that have been rate limited.HeaderValueOptionOrBuildergetResponseHeadersToAddOrBuilder(int index)Specifies a list of HTTP headers that should be added to each response for requests that have been rate limited.List<? extends HeaderValueOptionOrBuilder>getResponseHeadersToAddOrBuilderList()Specifies a list of HTTP headers that should be added to each response for requests that have been rate limited.intgetStage()Specifies the rate limit configurations to be applied with the same stage number.StringgetStatPrefix()The human readable prefix to use when emitting stats.com.google.protobuf.ByteStringgetStatPrefixBytes()The human readable prefix to use when emitting stats.HttpStatusgetStatus()This field allows for a custom HTTP response status code to the downstream client when the request has been rate limited.HttpStatusOrBuildergetStatusOrBuilder()This field allows for a custom HTTP response status code to the downstream client when the request has been rate limited.TokenBucketgetTokenBucket()The token bucket configuration to use for rate limiting requests that are processed by this filter.TokenBucketOrBuildergetTokenBucketOrBuilder()The token bucket configuration to use for rate limiting requests that are processed by this filter.booleanhasFilterEnabled()If set, this will enable -- but not necessarily enforce -- the rate limit for the given fraction of requests.booleanhasFilterEnforced()If set, this will enforce the rate limit decisions for the given fraction of requests.booleanhasStatus()This field allows for a custom HTTP response status code to the downstream client when the request has been rate limited.booleanhasTokenBucket()The token bucket configuration to use for rate limiting requests that are processed by this filter.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getStatPrefix
String getStatPrefix()
The human readable prefix to use when emitting stats.
string stat_prefix = 1 [(.validate.rules) = { ... }- Returns:
- The statPrefix.
-
getStatPrefixBytes
com.google.protobuf.ByteString getStatPrefixBytes()
The human readable prefix to use when emitting stats.
string stat_prefix = 1 [(.validate.rules) = { ... }- Returns:
- The bytes for statPrefix.
-
hasStatus
boolean hasStatus()
This field allows for a custom HTTP response status code to the downstream client when the request has been rate limited. Defaults to 429 (TooManyRequests). .. note:: If this is set to < 400, 429 will be used instead.
.envoy.type.v3.HttpStatus status = 2;- Returns:
- Whether the status field is set.
-
getStatus
HttpStatus getStatus()
This field allows for a custom HTTP response status code to the downstream client when the request has been rate limited. Defaults to 429 (TooManyRequests). .. note:: If this is set to < 400, 429 will be used instead.
.envoy.type.v3.HttpStatus status = 2;- Returns:
- The status.
-
getStatusOrBuilder
HttpStatusOrBuilder getStatusOrBuilder()
This field allows for a custom HTTP response status code to the downstream client when the request has been rate limited. Defaults to 429 (TooManyRequests). .. note:: If this is set to < 400, 429 will be used instead.
.envoy.type.v3.HttpStatus status = 2;
-
hasTokenBucket
boolean hasTokenBucket()
The token bucket configuration to use for rate limiting requests that are processed by this filter. Each request processed by the filter consumes a single token. If the token is available, the request will be allowed. If no tokens are available, the request will receive the configured rate limit status. .. note:: It's fine for the token bucket to be unset for the global configuration since the rate limit can be applied at a the virtual host or route level. Thus, the token bucket must be set for the per route configuration otherwise the config will be rejected. .. note:: When using per route configuration, the bucket becomes unique to that route. .. note:: In the current implementation the token bucket's :ref:`fill_interval <envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be >= 50ms to avoid too aggressive refills.
.envoy.type.v3.TokenBucket token_bucket = 3;- Returns:
- Whether the tokenBucket field is set.
-
getTokenBucket
TokenBucket getTokenBucket()
The token bucket configuration to use for rate limiting requests that are processed by this filter. Each request processed by the filter consumes a single token. If the token is available, the request will be allowed. If no tokens are available, the request will receive the configured rate limit status. .. note:: It's fine for the token bucket to be unset for the global configuration since the rate limit can be applied at a the virtual host or route level. Thus, the token bucket must be set for the per route configuration otherwise the config will be rejected. .. note:: When using per route configuration, the bucket becomes unique to that route. .. note:: In the current implementation the token bucket's :ref:`fill_interval <envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be >= 50ms to avoid too aggressive refills.
.envoy.type.v3.TokenBucket token_bucket = 3;- Returns:
- The tokenBucket.
-
getTokenBucketOrBuilder
TokenBucketOrBuilder getTokenBucketOrBuilder()
The token bucket configuration to use for rate limiting requests that are processed by this filter. Each request processed by the filter consumes a single token. If the token is available, the request will be allowed. If no tokens are available, the request will receive the configured rate limit status. .. note:: It's fine for the token bucket to be unset for the global configuration since the rate limit can be applied at a the virtual host or route level. Thus, the token bucket must be set for the per route configuration otherwise the config will be rejected. .. note:: When using per route configuration, the bucket becomes unique to that route. .. note:: In the current implementation the token bucket's :ref:`fill_interval <envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be >= 50ms to avoid too aggressive refills.
.envoy.type.v3.TokenBucket token_bucket = 3;
-
hasFilterEnabled
boolean hasFilterEnabled()
If set, this will enable -- but not necessarily enforce -- the rate limit for the given fraction of requests. Defaults to 0% of requests for safety.
.envoy.config.core.v3.RuntimeFractionalPercent filter_enabled = 4;- Returns:
- Whether the filterEnabled field is set.
-
getFilterEnabled
RuntimeFractionalPercent getFilterEnabled()
If set, this will enable -- but not necessarily enforce -- the rate limit for the given fraction of requests. Defaults to 0% of requests for safety.
.envoy.config.core.v3.RuntimeFractionalPercent filter_enabled = 4;- Returns:
- The filterEnabled.
-
getFilterEnabledOrBuilder
RuntimeFractionalPercentOrBuilder getFilterEnabledOrBuilder()
If set, this will enable -- but not necessarily enforce -- the rate limit for the given fraction of requests. Defaults to 0% of requests for safety.
.envoy.config.core.v3.RuntimeFractionalPercent filter_enabled = 4;
-
hasFilterEnforced
boolean hasFilterEnforced()
If set, this will enforce the rate limit decisions for the given fraction of requests. Note: this only applies to the fraction of enabled requests. Defaults to 0% of requests for safety.
.envoy.config.core.v3.RuntimeFractionalPercent filter_enforced = 5;- Returns:
- Whether the filterEnforced field is set.
-
getFilterEnforced
RuntimeFractionalPercent getFilterEnforced()
If set, this will enforce the rate limit decisions for the given fraction of requests. Note: this only applies to the fraction of enabled requests. Defaults to 0% of requests for safety.
.envoy.config.core.v3.RuntimeFractionalPercent filter_enforced = 5;- Returns:
- The filterEnforced.
-
getFilterEnforcedOrBuilder
RuntimeFractionalPercentOrBuilder getFilterEnforcedOrBuilder()
If set, this will enforce the rate limit decisions for the given fraction of requests. Note: this only applies to the fraction of enabled requests. Defaults to 0% of requests for safety.
.envoy.config.core.v3.RuntimeFractionalPercent filter_enforced = 5;
-
getRequestHeadersToAddWhenNotEnforcedList
List<HeaderValueOption> getRequestHeadersToAddWhenNotEnforcedList()
Specifies a list of HTTP headers that should be added to each request that has been rate limited and is also forwarded upstream. This can only occur when the filter is enabled but not enforced.
repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add_when_not_enforced = 10 [(.validate.rules) = { ... }
-
getRequestHeadersToAddWhenNotEnforced
HeaderValueOption getRequestHeadersToAddWhenNotEnforced(int index)
Specifies a list of HTTP headers that should be added to each request that has been rate limited and is also forwarded upstream. This can only occur when the filter is enabled but not enforced.
repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add_when_not_enforced = 10 [(.validate.rules) = { ... }
-
getRequestHeadersToAddWhenNotEnforcedCount
int getRequestHeadersToAddWhenNotEnforcedCount()
Specifies a list of HTTP headers that should be added to each request that has been rate limited and is also forwarded upstream. This can only occur when the filter is enabled but not enforced.
repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add_when_not_enforced = 10 [(.validate.rules) = { ... }
-
getRequestHeadersToAddWhenNotEnforcedOrBuilderList
List<? extends HeaderValueOptionOrBuilder> getRequestHeadersToAddWhenNotEnforcedOrBuilderList()
Specifies a list of HTTP headers that should be added to each request that has been rate limited and is also forwarded upstream. This can only occur when the filter is enabled but not enforced.
repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add_when_not_enforced = 10 [(.validate.rules) = { ... }
-
getRequestHeadersToAddWhenNotEnforcedOrBuilder
HeaderValueOptionOrBuilder getRequestHeadersToAddWhenNotEnforcedOrBuilder(int index)
Specifies a list of HTTP headers that should be added to each request that has been rate limited and is also forwarded upstream. This can only occur when the filter is enabled but not enforced.
repeated .envoy.config.core.v3.HeaderValueOption request_headers_to_add_when_not_enforced = 10 [(.validate.rules) = { ... }
-
getResponseHeadersToAddList
List<HeaderValueOption> getResponseHeadersToAddList()
Specifies a list of HTTP headers that should be added to each response for requests that have been rate limited. This occurs when the filter is either enabled or fully enforced.
repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 6 [(.validate.rules) = { ... }
-
getResponseHeadersToAdd
HeaderValueOption getResponseHeadersToAdd(int index)
Specifies a list of HTTP headers that should be added to each response for requests that have been rate limited. This occurs when the filter is either enabled or fully enforced.
repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 6 [(.validate.rules) = { ... }
-
getResponseHeadersToAddCount
int getResponseHeadersToAddCount()
Specifies a list of HTTP headers that should be added to each response for requests that have been rate limited. This occurs when the filter is either enabled or fully enforced.
repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 6 [(.validate.rules) = { ... }
-
getResponseHeadersToAddOrBuilderList
List<? extends HeaderValueOptionOrBuilder> getResponseHeadersToAddOrBuilderList()
Specifies a list of HTTP headers that should be added to each response for requests that have been rate limited. This occurs when the filter is either enabled or fully enforced.
repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 6 [(.validate.rules) = { ... }
-
getResponseHeadersToAddOrBuilder
HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder(int index)
Specifies a list of HTTP headers that should be added to each response for requests that have been rate limited. This occurs when the filter is either enabled or fully enforced.
repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 6 [(.validate.rules) = { ... }
-
getDescriptorsList
List<LocalRateLimitDescriptor> getDescriptorsList()
The rate limit descriptor list to use in the local rate limit to override on. The rate limit descriptor is selected by the first full match from the request descriptors. Example on how to use ::ref:`this <config_http_filters_local_rate_limit_descriptors>` .. note:: In the current implementation the descriptor's token bucket :ref:`fill_interval <envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be a multiple global :ref:`token bucket's<envoy_v3_api_field_extensions.filters.http.local_ratelimit.v3.LocalRateLimit.token_bucket>` fill interval. The descriptors must match verbatim for rate limiting to apply. There is no partial match by a subset of descriptor entries in the current implementation.
repeated .envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor descriptors = 8;
-
getDescriptors
LocalRateLimitDescriptor getDescriptors(int index)
The rate limit descriptor list to use in the local rate limit to override on. The rate limit descriptor is selected by the first full match from the request descriptors. Example on how to use ::ref:`this <config_http_filters_local_rate_limit_descriptors>` .. note:: In the current implementation the descriptor's token bucket :ref:`fill_interval <envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be a multiple global :ref:`token bucket's<envoy_v3_api_field_extensions.filters.http.local_ratelimit.v3.LocalRateLimit.token_bucket>` fill interval. The descriptors must match verbatim for rate limiting to apply. There is no partial match by a subset of descriptor entries in the current implementation.
repeated .envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor descriptors = 8;
-
getDescriptorsCount
int getDescriptorsCount()
The rate limit descriptor list to use in the local rate limit to override on. The rate limit descriptor is selected by the first full match from the request descriptors. Example on how to use ::ref:`this <config_http_filters_local_rate_limit_descriptors>` .. note:: In the current implementation the descriptor's token bucket :ref:`fill_interval <envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be a multiple global :ref:`token bucket's<envoy_v3_api_field_extensions.filters.http.local_ratelimit.v3.LocalRateLimit.token_bucket>` fill interval. The descriptors must match verbatim for rate limiting to apply. There is no partial match by a subset of descriptor entries in the current implementation.
repeated .envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor descriptors = 8;
-
getDescriptorsOrBuilderList
List<? extends LocalRateLimitDescriptorOrBuilder> getDescriptorsOrBuilderList()
The rate limit descriptor list to use in the local rate limit to override on. The rate limit descriptor is selected by the first full match from the request descriptors. Example on how to use ::ref:`this <config_http_filters_local_rate_limit_descriptors>` .. note:: In the current implementation the descriptor's token bucket :ref:`fill_interval <envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be a multiple global :ref:`token bucket's<envoy_v3_api_field_extensions.filters.http.local_ratelimit.v3.LocalRateLimit.token_bucket>` fill interval. The descriptors must match verbatim for rate limiting to apply. There is no partial match by a subset of descriptor entries in the current implementation.
repeated .envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor descriptors = 8;
-
getDescriptorsOrBuilder
LocalRateLimitDescriptorOrBuilder getDescriptorsOrBuilder(int index)
The rate limit descriptor list to use in the local rate limit to override on. The rate limit descriptor is selected by the first full match from the request descriptors. Example on how to use ::ref:`this <config_http_filters_local_rate_limit_descriptors>` .. note:: In the current implementation the descriptor's token bucket :ref:`fill_interval <envoy_v3_api_field_type.v3.TokenBucket.fill_interval>` must be a multiple global :ref:`token bucket's<envoy_v3_api_field_extensions.filters.http.local_ratelimit.v3.LocalRateLimit.token_bucket>` fill interval. The descriptors must match verbatim for rate limiting to apply. There is no partial match by a subset of descriptor entries in the current implementation.
repeated .envoy.extensions.common.ratelimit.v3.LocalRateLimitDescriptor descriptors = 8;
-
getStage
int getStage()
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.
uint32 stage = 9 [(.validate.rules) = { ... }- Returns:
- The stage.
-
getLocalRateLimitPerDownstreamConnection
boolean getLocalRateLimitPerDownstreamConnection()
Specifies the scope of the rate limiter's token bucket. If set to false, the token bucket is shared across all worker threads, thus the rate limits are applied per Envoy process. If set to true, a token bucket is allocated for each connection. Thus the rate limits are applied per connection thereby allowing one to rate limit requests on a per connection basis. If unspecified, the default value is false.
bool local_rate_limit_per_downstream_connection = 11;- Returns:
- The localRateLimitPerDownstreamConnection.
-
getEnableXRatelimitHeadersValue
int getEnableXRatelimitHeadersValue()
Defines the standard version to use for X-RateLimit headers emitted by the filter. Disabled by default.
.envoy.extensions.common.ratelimit.v3.XRateLimitHeadersRFCVersion enable_x_ratelimit_headers = 12 [(.validate.rules) = { ... }- Returns:
- The enum numeric value on the wire for enableXRatelimitHeaders.
-
getEnableXRatelimitHeaders
XRateLimitHeadersRFCVersion getEnableXRatelimitHeaders()
Defines the standard version to use for X-RateLimit headers emitted by the filter. Disabled by default.
.envoy.extensions.common.ratelimit.v3.XRateLimitHeadersRFCVersion enable_x_ratelimit_headers = 12 [(.validate.rules) = { ... }- Returns:
- The enableXRatelimitHeaders.
-
-