This repository has been archived on 2023-11-08. You can view files and clone it, but cannot push or open issues or pull requests.
fiddle/src/config.rs

23 lines
532 B
Rust

use debug_ignore::DebugIgnore;
use envconfig::Envconfig;
use lazy_static::lazy_static;
#[derive(Envconfig, Debug)]
pub struct Config {
#[envconfig(from = "FIDDLE_DB_URL")]
pub db_url: DebugIgnore<String>,
#[envconfig(from = "FIDDLE_DATA_DIR")]
pub data_dir: String,
#[envconfig(from = "FIDDLE_AUTO_PRUNE_SLEEP")]
pub auto_prune_sleep: u64,
#[envconfig(from = "FIDDLE_TAMPER_SLEEP")]
pub tamper_sleep: u64,
}
lazy_static! {
pub static ref CONFIG: Config = Config::init_from_env().unwrap();
}