pub struct Config {
pub listen: String,
pub data_dir: PathBuf,
pub api_token_env: String,
pub output_dir: Option<PathBuf>,
pub smtp: Option<SmtpConfig>,
pub data_hosts: Vec<DataHost>,
pub max_concurrent_renders: usize,
pub retry_delay_seconds: u64,
pub misfire_grace_minutes: u64,
pub history_limit: usize,
pub max_body_megabytes: usize,
}Expand description
The server’s configuration, read from a JSON file.
Fields§
§listen: StringAddress and port to listen on; the loopback interface by default.
data_dir: PathBufWhere layouts, jobs, history and documents are kept.
api_token_env: StringThe environment variable holding the API token.
output_dir: Option<PathBuf>The folder under which folder deliveries write; such deliveries are refused without it.
smtp: Option<SmtpConfig>The mail server; email deliveries are refused without it.
data_hosts: Vec<DataHost>The hosts url data sources may read from. Any other host is refused.
max_concurrent_renders: usizeHow many reports render at the same time.
retry_delay_seconds: u64The wait before the first retry of a failed run; it doubles on each retry.
misfire_grace_minutes: u64A run this late (the server was down) still happens; a later one is recorded as missed.
history_limit: usizeHow many runs of each job the history keeps.
max_body_megabytes: usizeThe largest request body accepted, in megabytes.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn 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 Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
Mutably borrows from an owned value. Read more