athena_rs 3.3.0

Database gateway API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::env;

/// Runtime kill-switch for the experimental deadpool backend.
///
/// - Missing env var: enabled (`true`)
/// - Values `false|0|no|off` (case-insensitive): disabled
pub fn deadpool_runtime_enabled() -> bool {
    let Ok(value) = env::var("ATHENA_DEADPOOL_ENABLED") else {
        return true;
    };
    match value.trim().to_ascii_lowercase().as_str() {
        "" => true,
        "false" | "0" | "no" | "off" => false,
        _ => true,
    }
}