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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.