moltendb_core/engine/
config.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct DbConfig {
5 pub path: String,
7 pub tiered_mode: bool,
9 pub sync_mode: bool,
11 pub hot_threshold: usize,
13 pub rate_limit_requests: u32,
15 pub rate_limit_window: u64,
17 pub max_body_size: usize,
19 #[serde(skip)]
21 pub encryption_key: Option<[u8; 32]>,
22 pub post_backup_script: Option<String>,
24}
25
26impl Default for DbConfig {
27 fn default() -> Self {
28 Self {
29 path: "molten.db".to_string(),
30 tiered_mode: false,
31 sync_mode: false,
32 hot_threshold: 50000,
33 rate_limit_requests: 1000,
34 rate_limit_window: 60,
35 max_body_size: 10 * 1024 * 1024,
36 encryption_key: None,
37 post_backup_script: None,
38 }
39 }
40}