Package io.envoyproxy.envoy.type.v3
Interface RateLimitStrategy.RequestsPerTimeUnitOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
RateLimitStrategy.RequestsPerTimeUnit
,RateLimitStrategy.RequestsPerTimeUnit.Builder
- Enclosing class:
RateLimitStrategy
public static interface RateLimitStrategy.RequestsPerTimeUnitOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionlong
The desired number of requests per :ref:`time_unit <envoy_v3_api_field_type.v3.RateLimitStrategy.RequestsPerTimeUnit.time_unit>` to allow.The unit of time.int
The unit of time.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getRequestsPerTimeUnit
long getRequestsPerTimeUnit()The desired number of requests per :ref:`time_unit <envoy_v3_api_field_type.v3.RateLimitStrategy.RequestsPerTimeUnit.time_unit>` to allow. If set to ``0``, deny all (equivalent to ``BlanketRule.DENY_ALL``). .. note:: Note that the algorithm implementation determines the course of action for the requests over the limit. As long as the ``requests_per_time_unit`` converges on the desired value, it's allowed to treat this field as a soft-limit: allow bursts, redistribute the allowance over time, etc.
uint64 requests_per_time_unit = 1;
- Returns:
- The requestsPerTimeUnit.
-
getTimeUnitValue
int getTimeUnitValue()The unit of time. Ignored when :ref:`requests_per_time_unit <envoy_v3_api_field_type.v3.RateLimitStrategy.RequestsPerTimeUnit.requests_per_time_unit>` is ``0`` (deny all).
.envoy.type.v3.RateLimitUnit time_unit = 2 [(.validate.rules) = { ... }
- Returns:
- The enum numeric value on the wire for timeUnit.
-
getTimeUnit
RateLimitUnit getTimeUnit()The unit of time. Ignored when :ref:`requests_per_time_unit <envoy_v3_api_field_type.v3.RateLimitStrategy.RequestsPerTimeUnit.requests_per_time_unit>` is ``0`` (deny all).
.envoy.type.v3.RateLimitUnit time_unit = 2 [(.validate.rules) = { ... }
- Returns:
- The timeUnit.
-