MCPcopy Create free account
hub / github.com/YougLin-dev/amp-server / load_from_file

Method load_from_file

api/src/proxy/config.rs:124–128  ·  view source on GitHub ↗

Load configuration from YAML file

(path: &str)

Source from the content-addressed store, hash-verified

122impl ProxyConfig {
123 /// Load configuration from YAML file
124 pub fn load_from_file(path: &str) -> Result<Self, Box<dyn std::error::Error>> {
125 let content = std::fs::read_to_string(path)?;
126 let config: ProxyConfig = serde_yaml::from_str(&content)?;
127 Ok(config)
128 }
129
130 /// Get enabled endpoint configurations
131 pub fn enabled_endpoints(&self) -> Vec<&EndpointConfig> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected