pub struct HttpProtocolOptions {
pub idle_timeout: Option<Duration>,
pub max_connection_duration: Option<Duration>,
pub max_headers_count: Option<UInt32Value>,
pub max_stream_duration: Option<Duration>,
pub headers_with_underscores_action: i32,
pub max_requests_per_connection: Option<UInt32Value>,
}
Expand description
[#next-free-field: 7]
Fields§
§idle_timeout: Option<Duration>
The idle timeout for connections. The idle timeout is defined as the
period in which there are no active requests. When the
idle timeout is reached the connection will be closed. If the connection is an HTTP/2
downstream connection a drain sequence will occur prior to closing the connection, see
:ref:drain_timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.drain_timeout>
.
Note that request based timeouts mean that HTTP/2 PINGs will not keep the connection alive.
If not specified, this defaults to 1 hour. To disable idle timeouts explicitly set this to 0.
.. warning:: Disabling this timeout has a highly likelihood of yielding connection leaks due to lost TCP FIN packets, etc.
If the :ref:overload action <config_overload_manager_overload_actions>
“envoy.overload_actions.reduce_timeouts”
is configured, this timeout is scaled for downstream connections according to the value for
:ref:HTTP_DOWNSTREAM_CONNECTION_IDLE <envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.HTTP_DOWNSTREAM_CONNECTION_IDLE>
.
max_connection_duration: Option<Duration>
The maximum duration of a connection. The duration is defined as a period since a connection
was established. If not set, there is no max duration. When max_connection_duration is reached
and if there are no active streams, the connection will be closed. If the connection is a
downstream connection and there are any active streams, the drain sequence will kick-in,
and the connection will be force-closed after the drain period. See :ref:drain_timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.drain_timeout>
.
max_headers_count: Option<UInt32Value>
The maximum number of headers. If unconfigured, the default maximum number of request headers allowed is 100. Requests that exceed this limit will receive a 431 response for HTTP/1.x and cause a stream reset for HTTP/2.
max_stream_duration: Option<Duration>
Total duration to keep alive an HTTP request/response stream. If the time limit is reached the stream will be reset independent of any other timeouts. If not specified, this value is not set.
headers_with_underscores_action: i32
Action to take when a client request with a header name containing underscore characters is received. If this setting is not specified, the value defaults to ALLOW. Note: upstream responses are not affected by this setting. Note: this only affects client headers. It does not affect headers added by Envoy filters and does not have any impact if added to cluster config.
max_requests_per_connection: Option<UInt32Value>
Optional maximum requests for both upstream and downstream connections. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. For HTTP/2 and HTTP/3, due to concurrent stream processing, the limit is approximate.
Implementations§
Source§impl HttpProtocolOptions
impl HttpProtocolOptions
Sourcepub fn headers_with_underscores_action(&self) -> HeadersWithUnderscoresAction
pub fn headers_with_underscores_action(&self) -> HeadersWithUnderscoresAction
Returns the enum value of headers_with_underscores_action
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_headers_with_underscores_action(
&mut self,
value: HeadersWithUnderscoresAction,
)
pub fn set_headers_with_underscores_action( &mut self, value: HeadersWithUnderscoresAction, )
Sets headers_with_underscores_action
to the provided enum value.
Trait Implementations§
Source§impl Clone for HttpProtocolOptions
impl Clone for HttpProtocolOptions
Source§fn clone(&self) -> HttpProtocolOptions
fn clone(&self) -> HttpProtocolOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for HttpProtocolOptions
impl Debug for HttpProtocolOptions
Source§impl Default for HttpProtocolOptions
impl Default for HttpProtocolOptions
Source§impl Message for HttpProtocolOptions
impl Message for HttpProtocolOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl Name for HttpProtocolOptions
impl Name for HttpProtocolOptions
Source§const NAME: &'static str = "HttpProtocolOptions"
const NAME: &'static str = "HttpProtocolOptions"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "envoy.config.core.v3"
const PACKAGE: &'static str = "envoy.config.core.v3"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for HttpProtocolOptions
impl PartialEq for HttpProtocolOptions
impl Copy for HttpProtocolOptions
impl StructuralPartialEq for HttpProtocolOptions
Auto Trait Implementations§
impl Freeze for HttpProtocolOptions
impl RefUnwindSafe for HttpProtocolOptions
impl Send for HttpProtocolOptions
impl Sync for HttpProtocolOptions
impl Unpin for HttpProtocolOptions
impl UnwindSafe for HttpProtocolOptions
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request