Struct ocypod::config::ServerConfig
source · pub struct ServerConfig {
pub host: String,
pub port: u16,
pub threads: Option<usize>,
pub max_body_size: Option<usize>,
pub timeout_check_interval: Duration,
pub retry_check_interval: Duration,
pub expiry_check_interval: Duration,
pub next_job_delay: Option<Duration>,
pub log_level: Level,
}
Expand description
Configuration for the application’s HTTP server.
Fields
host: String
Host address to listen on. Defaults to “127.0.0.1” if not specified.
port: u16
Port to listen on. Defaults to 8023 if not specified.
threads: Option<usize>
Number of HTTP worker threads. Defaults to number of CPUs if not specified.
max_body_size: Option<usize>
Maximum size in bytes for HTTP POST requests. Defaults to “256kB” if not specified.
timeout_check_interval: Duration
Determines how often running tasks are checked for timeouts. Defaults to “30s” if not specified.
retry_check_interval: Duration
Determines how often failed tasks are checked for retrying. Defaults to “60s” if not specified.
expiry_check_interval: Duration
Determines how often ended tasks are checked for expiry. Defaults to “5m” if not specified.
next_job_delay: Option<Duration>
log_level: Level
Trait Implementations
sourceimpl Clone for ServerConfig
impl Clone for ServerConfig
sourcefn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ServerConfig
impl Debug for ServerConfig
sourceimpl Default for ServerConfig
impl Default for ServerConfig
sourceimpl<'de> Deserialize<'de> for ServerConfigwhere
ServerConfig: Default,
impl<'de> Deserialize<'de> for ServerConfigwhere
ServerConfig: Default,
sourcefn 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 RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more