Struct controller::traefik::middlewares_crd::MiddlewareRateLimit   
source · pub struct MiddlewareRateLimit {
    pub average: Option<i64>,
    pub burst: Option<i64>,
    pub period: Option<IntOrString>,
    pub source_criterion: Option<MiddlewareRateLimitSourceCriterion>,
}Expand description
RateLimit holds the rate limit configuration. This middleware ensures that services will receive a fair amount of requests, and allows one to define what fair is. More info: https://doc.traefik.io/traefik/v3.0/middlewares/http/ratelimit/
Fields§
§average: Option<i64>Average is the maximum rate, by default in requests/s, allowed for the given source. It defaults to 0, which means no rate limiting. The rate is actually defined by dividing Average by Period. So for a rate below 1req/s, one needs to define a Period larger than a second.
burst: Option<i64>Burst is the maximum number of requests allowed to arrive in the same arbitrarily small period of time. It defaults to 1.
period: Option<IntOrString>Period, in combination with Average, defines the actual maximum rate, such as: r = Average / Period. It defaults to a second.
source_criterion: Option<MiddlewareRateLimitSourceCriterion>SourceCriterion defines what criterion is used to group requests as originating from a common source. If several strategies are defined at the same time, an error will be raised. If none are set, the default is to use the request’s remote address field (as an ipStrategy).
Trait Implementations§
source§impl Clone for MiddlewareRateLimit
 
impl Clone for MiddlewareRateLimit
source§fn clone(&self) -> MiddlewareRateLimit
 
fn clone(&self) -> MiddlewareRateLimit
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for MiddlewareRateLimit
 
impl Debug for MiddlewareRateLimit
source§impl Default for MiddlewareRateLimit
 
impl Default for MiddlewareRateLimit
source§fn default() -> MiddlewareRateLimit
 
fn default() -> MiddlewareRateLimit
source§impl<'de> Deserialize<'de> for MiddlewareRateLimit
 
impl<'de> Deserialize<'de> for MiddlewareRateLimit
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl JsonSchema for MiddlewareRateLimit
 
impl JsonSchema for MiddlewareRateLimit
source§fn schema_name() -> String
 
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
 
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
 
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
 
fn is_referenceable() -> bool
$ref keyword. Read more