MCPcopy Create free account
hub / github.com/cosdata/cosdata / load_config

Function load_config

src/config_loader.rs:189–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187}
188
189pub fn load_config() -> Result<Config, WaCustomError> {
190 let config_path = get_config_path();
191
192 let config_contents = std::fs::read_to_string(&config_path)
193 .map_err(|e| WaCustomError::ConfigError(format!("Failed to read config file: {}", e)))?;
194
195 toml::from_str(&config_contents)
196 .map_err(|e| WaCustomError::ConfigError(format!("Invalid config format: {}", e)))
197}
198
199#[derive(Debug, Deserialize, Clone)]
200pub struct CacheConfig {

Callers 2

mainFunction · 0.85
setup_with_timeoutFunction · 0.85

Calls 1

get_config_pathFunction · 0.85

Tested by 1

setup_with_timeoutFunction · 0.68