pub struct HttpServerConfig {
pub scheme: String,
pub host: String,
pub port: u16,
pub path: String,
pub max_request_body: usize,
pub max_response_body: usize,
pub max_inflight_requests: usize,
pub method: Option<String>,
pub tls_config: Option<ServerTlsConfig>,
}Expand description
Configuration for an HTTP server (consumer) endpoint.
Fields§
§scheme: StringURI scheme (“http” or “https”) parsed from the endpoint URI.
host: StringBind address, e.g. “0.0.0.0” or “127.0.0.1”.
port: u16TCP port to listen on.
path: StringURL path this consumer handles, e.g. “/orders”.
max_request_body: usizeMaximum request body size in bytes.
max_response_body: usizeMaximum response body size for materializing streams in bytes.
max_inflight_requests: usizeMaximum number of in-flight requests handled concurrently by this server.
method: Option<String>HTTP method this consumer handles (e.g. "GET"). When Some,
the consumer registers as a method-aware REST endpoint and the
path is treated as a template (e.g. /users/{id} is matched
against any /users/<value>). When None, the consumer
registers in the legacy path-only api_routes registry.
Extracted from the httpMethod= URI param at config build time.
tls_config: Option<ServerTlsConfig>Server-side TLS config. Populated from tlsCert/tlsKey URI params.
None for plain HTTP servers.
Implementations§
Source§impl HttpServerConfig
impl HttpServerConfig
pub fn from_uri_with_defaults( uri: &str, config: &HttpConfig, ) -> Result<Self, CamelError>
Trait Implementations§
Source§impl Clone for HttpServerConfig
impl Clone for HttpServerConfig
Source§fn clone(&self) -> HttpServerConfig
fn clone(&self) -> HttpServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HttpServerConfig
impl Debug for HttpServerConfig
Source§impl UriConfig for HttpServerConfig
impl UriConfig for HttpServerConfig
Source§fn from_uri(uri: &str) -> Result<Self, CamelError>
fn from_uri(uri: &str) -> Result<Self, CamelError>
Source§fn from_components(parts: UriComponents) -> Result<Self, CamelError>
fn from_components(parts: UriComponents) -> Result<Self, CamelError>
Source§fn validate(self) -> Result<Self, CamelError>
fn validate(self) -> Result<Self, CamelError>
Auto Trait Implementations§
impl Freeze for HttpServerConfig
impl RefUnwindSafe for HttpServerConfig
impl Send for HttpServerConfig
impl Sync for HttpServerConfig
impl Unpin for HttpServerConfig
impl UnsafeUnpin for HttpServerConfig
impl UnwindSafe for HttpServerConfig
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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