pub struct ListenerBuilder {Show 27 fields
pub address: SocketAddr,
pub protocol: Option<ListenerProtocol>,
pub public_address: Option<SocketAddr>,
pub answer_301: Option<String>,
pub answer_400: Option<String>,
pub answer_401: Option<String>,
pub answer_404: Option<String>,
pub answer_408: Option<String>,
pub answer_413: Option<String>,
pub answer_502: Option<String>,
pub answer_503: Option<String>,
pub answer_504: Option<String>,
pub answer_507: Option<String>,
pub tls_versions: Option<Vec<TlsVersion>>,
pub cipher_list: Option<Vec<String>>,
pub cipher_suites: Option<Vec<String>>,
pub expect_proxy: Option<bool>,
pub sticky_name: String,
pub certificate: Option<String>,
pub certificate_chain: Option<String>,
pub key: Option<String>,
pub front_timeout: Option<u32>,
pub back_timeout: Option<u32>,
pub connect_timeout: Option<u32>,
pub request_timeout: Option<u32>,
pub config: Option<Config>,
pub send_tls13_tickets: Option<u64>,
}Expand description
An HTTP, HTTPS or TCP listener as parsed from the Listeners section in the toml
Fields§
§address: SocketAddr§protocol: Option<ListenerProtocol>§public_address: Option<SocketAddr>§answer_301: Option<String>§answer_400: Option<String>§answer_401: Option<String>§answer_404: Option<String>§answer_408: Option<String>§answer_413: Option<String>§answer_502: Option<String>§answer_503: Option<String>§answer_504: Option<String>§answer_507: Option<String>§tls_versions: Option<Vec<TlsVersion>>§cipher_list: Option<Vec<String>>§cipher_suites: Option<Vec<String>>§expect_proxy: Option<bool>§sticky_name: String§certificate: Option<String>§certificate_chain: Option<String>§key: Option<String>§front_timeout: Option<u32>maximum time of inactivity for a frontend socket
back_timeout: Option<u32>maximum time of inactivity for a backend socket
connect_timeout: Option<u32>maximum time to connect to a backend server
request_timeout: Option<u32>maximum time to receive a request since the connection started
config: Option<Config>A Config to pull defaults from
send_tls13_tickets: Option<u64>Number of TLS 1.3 tickets to send to a client when establishing a connection. The ticket allow the client to resume a session. This protects the client agains session tracking. Defaults to 4.
Implementations§
Source§impl ListenerBuilder
impl ListenerBuilder
Sourcepub fn new_http(address: SocketAddress) -> ListenerBuilder
pub fn new_http(address: SocketAddress) -> ListenerBuilder
starts building an HTTP Listener with config values for timeouts, or defaults if no config is provided
Sourcepub fn new_tcp(address: SocketAddress) -> ListenerBuilder
pub fn new_tcp(address: SocketAddress) -> ListenerBuilder
starts building an HTTPS Listener with config values for timeouts, or defaults if no config is provided
Sourcepub fn new_https(address: SocketAddress) -> ListenerBuilder
pub fn new_https(address: SocketAddress) -> ListenerBuilder
starts building a TCP Listener with config values for timeouts, or defaults if no config is provided
pub fn with_public_address( &mut self, public_address: Option<SocketAddr>, ) -> &mut Self
pub fn with_answer_404_path<S>(
&mut self,
answer_404_path: Option<S>,
) -> &mut Selfwhere
S: ToString,
pub fn with_answer_503_path<S>(
&mut self,
answer_503_path: Option<S>,
) -> &mut Selfwhere
S: ToString,
pub fn with_tls_versions(&mut self, tls_versions: Vec<TlsVersion>) -> &mut Self
pub fn with_cipher_list( &mut self, cipher_list: Option<Vec<String>>, ) -> &mut Self
pub fn with_cipher_suites( &mut self, cipher_suites: Option<Vec<String>>, ) -> &mut Self
pub fn with_expect_proxy(&mut self, expect_proxy: bool) -> &mut Self
pub fn with_sticky_name<S>(&mut self, sticky_name: Option<S>) -> &mut Selfwhere
S: ToString,
pub fn with_certificate<S>(&mut self, certificate: S) -> &mut Selfwhere
S: ToString,
pub fn with_certificate_chain(&mut self, certificate_chain: String) -> &mut Self
pub fn with_key<S>(&mut self, key: String) -> &mut Selfwhere
S: ToString,
pub fn with_front_timeout(&mut self, front_timeout: Option<u32>) -> &mut Self
pub fn with_back_timeout(&mut self, back_timeout: Option<u32>) -> &mut Self
pub fn with_connect_timeout( &mut self, connect_timeout: Option<u32>, ) -> &mut Self
pub fn with_request_timeout( &mut self, request_timeout: Option<u32>, ) -> &mut Self
Sourcepub fn to_http(
&mut self,
config: Option<&Config>,
) -> Result<HttpListenerConfig, ConfigError>
pub fn to_http( &mut self, config: Option<&Config>, ) -> Result<HttpListenerConfig, ConfigError>
build an HTTP listener with config timeouts, using defaults if no config is provided
Sourcepub fn to_tls(
&mut self,
config: Option<&Config>,
) -> Result<HttpsListenerConfig, ConfigError>
pub fn to_tls( &mut self, config: Option<&Config>, ) -> Result<HttpsListenerConfig, ConfigError>
build an HTTPS listener using defaults if no config or values were provided upstream
Sourcepub fn to_tcp(
&mut self,
config: Option<&Config>,
) -> Result<TcpListenerConfig, ConfigError>
pub fn to_tcp( &mut self, config: Option<&Config>, ) -> Result<TcpListenerConfig, ConfigError>
build an HTTPS listener using defaults if no config or values were provided upstream
Trait Implementations§
Source§impl Clone for ListenerBuilder
impl Clone for ListenerBuilder
Source§fn clone(&self) -> ListenerBuilder
fn clone(&self) -> ListenerBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more