reifydb_store_multi/
config.rs1use std::time::Duration;
5
6use reifydb_core::event::EventBus;
7use reifydb_runtime::actor::system::ActorSystem;
8
9use crate::hot::storage::HotStorage;
10
11#[derive(Clone)]
12pub struct MultiStoreConfig {
13 pub hot: Option<HotConfig>,
14 pub warm: Option<WarmConfig>,
15 pub cold: Option<ColdConfig>,
16 pub retention: RetentionConfig,
17 pub merge_config: MergeConfig,
18 pub event_bus: EventBus,
19 pub actor_system: ActorSystem,
20}
21
22#[derive(Clone)]
23pub struct HotConfig {
24 pub storage: HotStorage,
25}
26
27#[derive(Clone, Default)]
31pub struct WarmConfig;
32
33#[derive(Clone, Default)]
37pub struct ColdConfig;
38
39#[derive(Clone, Debug)]
40pub struct RetentionConfig {
41 pub hot: Duration,
42 pub warm: Duration,
43 }
45
46#[derive(Clone, Debug)]
47pub struct MergeConfig {
48 pub merge_threshold_rows: usize,
49 pub merge_batch_size: usize,
50 pub enable_auto_eviction: bool,
51}
52
53impl Default for RetentionConfig {
54 fn default() -> Self {
55 Self {
56 hot: Duration::from_secs(300), warm: Duration::from_secs(3600), }
59 }
60}
61
62impl Default for MergeConfig {
63 fn default() -> Self {
64 Self {
65 merge_threshold_rows: 100_000,
66 merge_batch_size: 10_000,
67 enable_auto_eviction: true,
68 }
69 }
70}