#[non_exhaustive]pub struct ListenConfig {
pub http: String,
pub max_connections: Option<usize>,
pub tls: Option<ListenTlsConfig>,
pub idle_timeout_secs: u64,
pub header_read_timeout_secs: u64,
pub drain_timeout_secs: u64,
}Expand description
The listener ProxyServer::serve runs.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.http: StringListen address (default: “0.0.0.0:8080”).
max_connections: Option<usize>Most connections served at once; past it the next connection is accepted when one closes. Unset: no limit.
tls: Option<ListenTlsConfig>TLS on the listener, mTLS with client_ca_file. Unset: cleartext.
idle_timeout_secs: u64Seconds a connection may go without a request in flight before it is
closed (HTTP/2 gets a GOAWAY), so idle clients do not hold
max_connections slots. 0 keeps idle connections open. Default: 60.
header_read_timeout_secs: u64Seconds an HTTP/1.1 client has to send a request’s headers. At least
- Default: 30.
drain_timeout_secs: u64Seconds a graceful shutdown waits for open connections to finish what they serve; the ones still open after it are closed. 0 waits for all. Default: 25, below the 30 s grace period Kubernetes gives by default.
Trait Implementations§
Source§impl Clone for ListenConfig
impl Clone for ListenConfig
Source§impl Debug for ListenConfig
impl Debug for ListenConfig
Source§impl Default for ListenConfig
impl Default for ListenConfig
Source§impl<'de> Deserialize<'de> for ListenConfig
impl<'de> Deserialize<'de> for ListenConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ListenConfig
impl RefUnwindSafe for ListenConfig
impl Send for ListenConfig
impl Sync for ListenConfig
impl Unpin for ListenConfig
impl UnsafeUnpin for ListenConfig
impl UnwindSafe for ListenConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
Wrap the input message
T in a tonic::Request