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

Function service_url_for_gateway

crates/openshell-cli/src/run.rs:4460–4476  ·  view source on GitHub ↗
(service_url: &str, gateway_endpoint: &str)

Source from the content-addressed store, hash-verified

4458}
4459
4460fn service_url_for_gateway(service_url: &str, gateway_endpoint: &str) -> String {
4461 let (Ok(mut service_url), Ok(gateway_endpoint)) = (
4462 url::Url::parse(service_url),
4463 url::Url::parse(gateway_endpoint),
4464 ) else {
4465 return service_url.to_string();
4466 };
4467
4468 if service_url
4469 .set_port(gateway_endpoint.port_or_known_default())
4470 .is_err()
4471 {
4472 return service_url.to_string();
4473 }
4474
4475 service_url.to_string()
4476}
4477
4478async fn gateway_providers_v2_enabled(client: &mut crate::tls::GrpcClient) -> Result<bool> {
4479 let response = client

Callers 2

service_exposeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected