(config: &ServiceRoutingConfig, sandbox: &str, service: &str)
| 74 | } |
| 75 | |
| 76 | fn endpoint_host(config: &ServiceRoutingConfig, sandbox: &str, service: &str) -> Option<String> { |
| 77 | let base_domain = config.base_domains.first()?; |
| 78 | Some(if service.is_empty() { |
| 79 | format!("{sandbox}.{base_domain}") |
| 80 | } else { |
| 81 | format!("{sandbox}--{service}.{base_domain}") |
| 82 | }) |
| 83 | } |
| 84 | |
| 85 | pub fn parse_host(host: &str, config: &ServiceRoutingConfig) -> Option<(String, String)> { |
| 86 | let host = host.split_once(':').map_or(host, |(name, _)| name); |
no test coverage detected