Expand description
Centralized configuration management.
Configuration is loaded once at startup from an AES-256-GCM encrypted file (secrets.enc),
decrypted using a passphrase the admin enters at the terminal. No .env files, no plaintext
secrets on disk.
The loaded config is stored in a global [ArcSwap] singleton, meaning:
- All reads are atomic and lock-free via
Config::get() - The config can be hot-reloaded at runtime via
Config::reload()without restarting the server - Any reload is immediately visible to all subsequent
Config::get()calls across all threads
All configuration fields are defined in config_schema.rs using the define_config_schema! macro.
This file now handles only the runtime logic (loading, reloading, parsing) — it never duplicates field definitions.
Re-exports§
pub use crate::utility::config_schema::CONFIG_SCHEMA;pub use crate::utility::config_schema::field_names;
Structs§
- Config
- Server-wide configuration, loaded from the encrypted
secrets.encfile at startup.
Statics§
- CONFIG 🔒
- The global configuration singleton.