Skip to content

Commit

Permalink
Digital Twin Graph
Browse files Browse the repository at this point in the history
  • Loading branch information
ashbeitz committed May 6, 2024
1 parent ce9f992 commit 66f2c0f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion core/module/digital_twin_graph/src/digital_twin_graph_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,28 @@ use serde_derive::Deserialize;

const DEFAULT_CONFIG_FILENAME: &str = "digital_twin_graph_settings";

/// The settings for the digital twin graph service.
#[derive(Debug, Deserialize)]
pub struct Settings {
/// The authority (address + optional port in the format "<address>[:<port>]") for the Ibeji application server.
pub base_authority: String,
}

/// Load the settings.
/// The settings are loaded from the default config file name.
///
/// # Returns
/// The settings.
pub fn load_settings() -> Settings {
utils::load_settings(DEFAULT_CONFIG_FILENAME).unwrap()
}

/// Load the settings.
/// Load the settings with the specified config file name.
///
/// # Arguments
/// * `config_filename` - The name of the config file.
/// # Returns
/// The settings.
pub fn load_settings_with_config_filename(config_filename: &str) -> Settings {
utils::load_settings(config_filename).unwrap()
}

0 comments on commit 66f2c0f

Please sign in to comment.