sui_deepbook_indexer/
config.rs1use serde::{Deserialize, Serialize};
5use std::env;
6
7#[derive(Debug, Clone, Deserialize, Serialize)]
9pub struct IndexerConfig {
10 pub remote_store_url: String,
11 #[serde(default = "default_db_url")]
12 pub db_url: String,
13 pub checkpoints_path: Option<String>,
15 pub sui_rpc_url: String,
16 pub deepbook_package_id: String,
17 pub deepbook_genesis_checkpoint: u64,
18 pub concurrency: u64,
19 pub metric_port: u16,
20 pub service_port: u16,
21}
22
23impl sui_config::Config for IndexerConfig {}
24
25pub fn default_db_url() -> String {
26 env::var("DB_URL").expect("db_url must be set in config or via the $DB_URL env var")
27}