Class LocalRateLimit
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- io.envoyproxy.envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,LocalRateLimitOrBuilder,Serializable
public final class LocalRateLimit extends com.google.protobuf.GeneratedMessageV3 implements LocalRateLimitOrBuilder
[#next-free-field: 13]
Protobuf typeenvoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLocalRateLimit.Builder[#next-free-field: 13]-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intDESCRIPTORS_FIELD_NUMBERstatic intENABLE_X_RATELIMIT_HEADERS_FIELD_NUMBERstatic intFILTER_ENABLED_FIELD_NUMBERstatic intFILTER_ENFORCED_FIELD_NUMBERstatic intLOCAL_RATE_LIMIT_PER_DOWNSTREAM_CONNECTION_FIELD_NUMBERstatic intREQUEST_HEADERS_TO_ADD_WHEN_NOT_ENFORCED_FIELD_NUMBERstatic intRESPONSE_HEADERS_TO_ADD_FIELD_NUMBERstatic intSTAGE_FIELD_NUMBERstatic intSTAT_PREFIX_FIELD_NUMBERstatic intSTATUS_FIELD_NUMBERstatic intTOKEN_BUCKET_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static LocalRateLimitgetDefaultInstance()LocalRateLimitgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()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.com.google.protobuf.Parser<LocalRateLimit>getParserForType()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.intgetSerializedSize()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.com.google.protobuf.UnknownFieldSetgetUnknownFields()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.inthashCode()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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static LocalRateLimit.BuildernewBuilder()static LocalRateLimit.BuildernewBuilder(LocalRateLimit prototype)LocalRateLimit.BuildernewBuilderForType()protected LocalRateLimit.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static LocalRateLimitparseDelimitedFrom(InputStream input)static LocalRateLimitparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static LocalRateLimitparseFrom(byte[] data)static LocalRateLimitparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static LocalRateLimitparseFrom(com.google.protobuf.ByteString data)static LocalRateLimitparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static LocalRateLimitparseFrom(com.google.protobuf.CodedInputStream input)static LocalRateLimitparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static LocalRateLimitparseFrom(InputStream input)static LocalRateLimitparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static LocalRateLimitparseFrom(ByteBuffer data)static LocalRateLimitparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<LocalRateLimit>parser()LocalRateLimit.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
STAT_PREFIX_FIELD_NUMBER
public static final int STAT_PREFIX_FIELD_NUMBER
- See Also:
- Constant Field Values
-
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TOKEN_BUCKET_FIELD_NUMBER
public static final int TOKEN_BUCKET_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FILTER_ENABLED_FIELD_NUMBER
public static final int FILTER_ENABLED_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FILTER_ENFORCED_FIELD_NUMBER
public static final int FILTER_ENFORCED_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REQUEST_HEADERS_TO_ADD_WHEN_NOT_ENFORCED_FIELD_NUMBER
public static final int REQUEST_HEADERS_TO_ADD_WHEN_NOT_ENFORCED_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER
public static final int RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DESCRIPTORS_FIELD_NUMBER
public static final int DESCRIPTORS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
STAGE_FIELD_NUMBER
public static final int STAGE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LOCAL_RATE_LIMIT_PER_DOWNSTREAM_CONNECTION_FIELD_NUMBER
public static final int LOCAL_RATE_LIMIT_PER_DOWNSTREAM_CONNECTION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ENABLE_X_RATELIMIT_HEADERS_FIELD_NUMBER
public static final int ENABLE_X_RATELIMIT_HEADERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getStatPrefix
public String getStatPrefix()
The human readable prefix to use when emitting stats.
string stat_prefix = 1 [(.validate.rules) = { ... }- Specified by:
getStatPrefixin interfaceLocalRateLimitOrBuilder- Returns:
- The statPrefix.
-
getStatPrefixBytes
public com.google.protobuf.ByteString getStatPrefixBytes()
The human readable prefix to use when emitting stats.
string stat_prefix = 1 [(.validate.rules) = { ... }- Specified by:
getStatPrefixBytesin interfaceLocalRateLimitOrBuilder- Returns:
- The bytes for statPrefix.
-
hasStatus
public 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;- Specified by:
hasStatusin interfaceLocalRateLimitOrBuilder- Returns:
- Whether the status field is set.
-
getStatus
public 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;- Specified by:
getStatusin interfaceLocalRateLimitOrBuilder- Returns:
- The status.
-
getStatusOrBuilder
public 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;- Specified by:
getStatusOrBuilderin interfaceLocalRateLimitOrBuilder
-
hasTokenBucket
public 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;- Specified by:
hasTokenBucketin interfaceLocalRateLimitOrBuilder- Returns:
- Whether the tokenBucket field is set.
-
getTokenBucket
public 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;- Specified by:
getTokenBucketin interfaceLocalRateLimitOrBuilder- Returns:
- The tokenBucket.
-
getTokenBucketOrBuilder
public 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;- Specified by:
getTokenBucketOrBuilderin interfaceLocalRateLimitOrBuilder
-
hasFilterEnabled
public 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;- Specified by:
hasFilterEnabledin interfaceLocalRateLimitOrBuilder- Returns:
- Whether the filterEnabled field is set.
-
getFilterEnabled
public 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;- Specified by:
getFilterEnabledin interfaceLocalRateLimitOrBuilder- Returns:
- The filterEnabled.
-
getFilterEnabledOrBuilder
public 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;- Specified by:
getFilterEnabledOrBuilderin interfaceLocalRateLimitOrBuilder
-
hasFilterEnforced
public 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;- Specified by:
hasFilterEnforcedin interfaceLocalRateLimitOrBuilder- Returns:
- Whether the filterEnforced field is set.
-
getFilterEnforced
public 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;- Specified by:
getFilterEnforcedin interfaceLocalRateLimitOrBuilder- Returns:
- The filterEnforced.
-
getFilterEnforcedOrBuilder
public 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;- Specified by:
getFilterEnforcedOrBuilderin interfaceLocalRateLimitOrBuilder
-
getRequestHeadersToAddWhenNotEnforcedList
public 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) = { ... }- Specified by:
getRequestHeadersToAddWhenNotEnforcedListin interfaceLocalRateLimitOrBuilder
-
getRequestHeadersToAddWhenNotEnforcedOrBuilderList
public 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) = { ... }- Specified by:
getRequestHeadersToAddWhenNotEnforcedOrBuilderListin interfaceLocalRateLimitOrBuilder
-
getRequestHeadersToAddWhenNotEnforcedCount
public 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) = { ... }- Specified by:
getRequestHeadersToAddWhenNotEnforcedCountin interfaceLocalRateLimitOrBuilder
-
getRequestHeadersToAddWhenNotEnforced
public 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) = { ... }- Specified by:
getRequestHeadersToAddWhenNotEnforcedin interfaceLocalRateLimitOrBuilder
-
getRequestHeadersToAddWhenNotEnforcedOrBuilder
public 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) = { ... }- Specified by:
getRequestHeadersToAddWhenNotEnforcedOrBuilderin interfaceLocalRateLimitOrBuilder
-
getResponseHeadersToAddList
public 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) = { ... }- Specified by:
getResponseHeadersToAddListin interfaceLocalRateLimitOrBuilder
-
getResponseHeadersToAddOrBuilderList
public 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) = { ... }- Specified by:
getResponseHeadersToAddOrBuilderListin interfaceLocalRateLimitOrBuilder
-
getResponseHeadersToAddCount
public 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) = { ... }- Specified by:
getResponseHeadersToAddCountin interfaceLocalRateLimitOrBuilder
-
getResponseHeadersToAdd
public 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) = { ... }- Specified by:
getResponseHeadersToAddin interfaceLocalRateLimitOrBuilder
-
getResponseHeadersToAddOrBuilder
public 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) = { ... }- Specified by:
getResponseHeadersToAddOrBuilderin interfaceLocalRateLimitOrBuilder
-
getDescriptorsList
public 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;- Specified by:
getDescriptorsListin interfaceLocalRateLimitOrBuilder
-
getDescriptorsOrBuilderList
public 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;- Specified by:
getDescriptorsOrBuilderListin interfaceLocalRateLimitOrBuilder
-
getDescriptorsCount
public 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;- Specified by:
getDescriptorsCountin interfaceLocalRateLimitOrBuilder
-
getDescriptors
public 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;- Specified by:
getDescriptorsin interfaceLocalRateLimitOrBuilder
-
getDescriptorsOrBuilder
public 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;- Specified by:
getDescriptorsOrBuilderin interfaceLocalRateLimitOrBuilder
-
getStage
public 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) = { ... }- Specified by:
getStagein interfaceLocalRateLimitOrBuilder- Returns:
- The stage.
-
getLocalRateLimitPerDownstreamConnection
public 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;- Specified by:
getLocalRateLimitPerDownstreamConnectionin interfaceLocalRateLimitOrBuilder- Returns:
- The localRateLimitPerDownstreamConnection.
-
getEnableXRatelimitHeadersValue
public 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) = { ... }- Specified by:
getEnableXRatelimitHeadersValuein interfaceLocalRateLimitOrBuilder- Returns:
- The enum numeric value on the wire for enableXRatelimitHeaders.
-
getEnableXRatelimitHeaders
public 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) = { ... }- Specified by:
getEnableXRatelimitHeadersin interfaceLocalRateLimitOrBuilder- Returns:
- The enableXRatelimitHeaders.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static LocalRateLimit parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LocalRateLimit parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LocalRateLimit parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LocalRateLimit parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LocalRateLimit parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LocalRateLimit parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static LocalRateLimit parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static LocalRateLimit parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static LocalRateLimit parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static LocalRateLimit parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static LocalRateLimit parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static LocalRateLimit parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public LocalRateLimit.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static LocalRateLimit.Builder newBuilder()
-
newBuilder
public static LocalRateLimit.Builder newBuilder(LocalRateLimit prototype)
-
toBuilder
public LocalRateLimit.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected LocalRateLimit.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static LocalRateLimit getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<LocalRateLimit> parser()
-
getParserForType
public com.google.protobuf.Parser<LocalRateLimit> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public LocalRateLimit getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-