Struct pemmican::config::Config
[−]
[src]
pub struct Config { pub num_threads: usize, pub shutdown_timeout: Duration, pub keep_alive: bool, }
Configuration settings for a Pemmican server instance
Fields
num_threads: usize
Number of threads for the CpuPool. Note that handler functions are run on the
main thread, and you must use pemmican.pool
if you want to run code on a
separate thread in the Pemmican CpuPool. Defaults to 4.
shutdown_timeout: Duration
Configure the amount of time the server will wait for a "graceful shutdown". This is the amount of time after the shutdown signal is received the server will wait for all pending connections to finish. If the timeout elapses then the server will be forcibly shut down. Defaults to 1s.
keep_alive: bool
Enable or disable Keep-alive. Default is true.