zen_engine/
config.rs

1use once_cell::sync::Lazy;
2use std::sync::atomic::{AtomicBool, AtomicU64};
3
4#[derive(Debug)]
5pub struct ZenConfig {
6    pub nodes_in_context: AtomicBool,
7    pub function_timeout_millis: AtomicU64,
8    pub http_auth: AtomicBool,
9}
10
11impl Default for ZenConfig {
12    fn default() -> Self {
13        Self {
14            nodes_in_context: AtomicBool::new(true),
15            function_timeout_millis: AtomicU64::new(5_000),
16            http_auth: AtomicBool::new(true),
17        }
18    }
19}
20
21pub static ZEN_CONFIG: Lazy<ZenConfig> = Lazy::new(|| Default::default());