pub struct MiddlewareBuffering {
pub max_request_body_bytes: Option<i64>,
pub max_response_body_bytes: Option<i64>,
pub mem_request_body_bytes: Option<i64>,
pub mem_response_body_bytes: Option<i64>,
pub retry_expression: Option<String>,
}
Expand description
Buffering holds the buffering middleware configuration. This middleware retries or limits the size of requests that can be forwarded to backends. More info: https://doc.traefik.io/traefik/v3.3/middlewares/http/buffering/#maxrequestbodybytes
Fields§
§max_request_body_bytes: Option<i64>
MaxRequestBodyBytes defines the maximum allowed body size for the request (in bytes). If the request exceeds the allowed size, it is not forwarded to the service, and the client gets a 413 (Request Entity Too Large) response. Default: 0 (no maximum).
max_response_body_bytes: Option<i64>
MaxResponseBodyBytes defines the maximum allowed response size from the service (in bytes). If the response exceeds the allowed size, it is not forwarded to the client. The client gets a 500 (Internal Server Error) response instead. Default: 0 (no maximum).
mem_request_body_bytes: Option<i64>
MemRequestBodyBytes defines the threshold (in bytes) from which the request will be buffered on disk instead of in memory. Default: 1048576 (1Mi).
mem_response_body_bytes: Option<i64>
MemResponseBodyBytes defines the threshold (in bytes) from which the response will be buffered on disk instead of in memory. Default: 1048576 (1Mi).
retry_expression: Option<String>
RetryExpression defines the retry conditions. It is a logical combination of functions with operators AND (&&) and OR (||). More info: https://doc.traefik.io/traefik/v3.3/middlewares/http/buffering/#retryexpression
Implementations§
Source§impl MiddlewareBuffering
impl MiddlewareBuffering
Sourcepub fn builder() -> MiddlewareBufferingBuilder<((), (), (), (), ())>
pub fn builder() -> MiddlewareBufferingBuilder<((), (), (), (), ())>
Create a builder for building MiddlewareBuffering
.
On the builder, call .max_request_body_bytes(...)
(optional), .max_response_body_bytes(...)
(optional), .mem_request_body_bytes(...)
(optional), .mem_response_body_bytes(...)
(optional), .retry_expression(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of MiddlewareBuffering
.
Trait Implementations§
Source§impl Clone for MiddlewareBuffering
impl Clone for MiddlewareBuffering
Source§fn clone(&self) -> MiddlewareBuffering
fn clone(&self) -> MiddlewareBuffering
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MiddlewareBuffering
impl Debug for MiddlewareBuffering
Source§impl Default for MiddlewareBuffering
impl Default for MiddlewareBuffering
Source§fn default() -> MiddlewareBuffering
fn default() -> MiddlewareBuffering
Source§impl<'de> Deserialize<'de> for MiddlewareBuffering
impl<'de> Deserialize<'de> for MiddlewareBuffering
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 MiddlewareBuffering
impl JsonSchema for MiddlewareBuffering
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(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreSource§impl PartialEq for MiddlewareBuffering
impl PartialEq for MiddlewareBuffering
Source§impl Serialize for MiddlewareBuffering
impl Serialize for MiddlewareBuffering
impl StructuralPartialEq for MiddlewareBuffering
Auto Trait Implementations§
impl Freeze for MiddlewareBuffering
impl RefUnwindSafe for MiddlewareBuffering
impl Send for MiddlewareBuffering
impl Sync for MiddlewareBuffering
impl Unpin for MiddlewareBuffering
impl UnwindSafe for MiddlewareBuffering
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more