mirror of
https://github.com/gorules/zen.git
synced 2026-12-04 08:09:17 +00:00
* temp: http auth * add better error handling * improve Cargo.toml format * add enable/disable for http auth * make aws region optional * add fallback for aws
22 lines
556 B
Rust
22 lines
556 B
Rust
use once_cell::sync::Lazy;
|
|
use std::sync::atomic::{AtomicBool, AtomicU64};
|
|
|
|
#[derive(Debug)]
|
|
pub struct ZenConfig {
|
|
pub nodes_in_context: AtomicBool,
|
|
pub function_timeout_millis: AtomicU64,
|
|
pub http_auth: AtomicBool,
|
|
}
|
|
|
|
impl Default for ZenConfig {
|
|
fn default() -> Self {
|
|
Self {
|
|
nodes_in_context: AtomicBool::new(true),
|
|
function_timeout_millis: AtomicU64::new(5_000),
|
|
http_auth: AtomicBool::new(true),
|
|
}
|
|
}
|
|
}
|
|
|
|
pub static ZEN_CONFIG: Lazy<ZenConfig> = Lazy::new(|| Default::default());
|