Get a configuration instance with all values resolved from CLI args and environment variables
()
| 163 | impl Config { |
| 164 | /// Get a configuration instance with all values resolved from CLI args and environment variables |
| 165 | pub fn load() -> Self { |
| 166 | let config = Config::parse(); |
| 167 | |
| 168 | // Validate SSL configuration |
| 169 | if config.ssl && config.no_tcp { |
| 170 | eprintln!("Error: SSL cannot be enabled when TCP is disabled (Unix sockets don't support SSL)"); |
| 171 | std::process::exit(1); |
| 172 | } |
| 173 | |
| 174 | config |
| 175 | } |
| 176 | |
| 177 | /// Get the cache metrics interval as Duration |
| 178 | pub fn cache_metrics_interval_duration(&self) -> std::time::Duration { |
no outgoing calls