MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / endpoint_host

Function endpoint_host

crates/openshell-server/src/service_routing.rs:76–83  ·  view source on GitHub ↗
(config: &ServiceRoutingConfig, sandbox: &str, service: &str)

Source from the content-addressed store, hash-verified

74}
75
76fn 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
85pub fn parse_host(host: &str, config: &ServiceRoutingConfig) -> Option<(String, String)> {
86 let host = host.split_once(':').map_or(host, |(name, _)| name);

Callers 1

endpoint_urlFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected