Load configuration from YAML file
(path: &str)
| 122 | impl 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> { |
nothing calls this directly
no outgoing calls
no test coverage detected