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

Function service_list

crates/openshell-cli/src/run.rs:4169–4198  ·  view source on GitHub ↗
(
    server: &str,
    sandbox: Option<&str>,
    limit: u32,
    offset: u32,
    tls: &TlsOptions,
)

Source from the content-addressed store, hash-verified

4167}
4168
4169pub async fn service_list(
4170 server: &str,
4171 sandbox: Option<&str>,
4172 limit: u32,
4173 offset: u32,
4174 tls: &TlsOptions,
4175) -> Result<()> {
4176 let mut client = grpc_client(server, tls).await?;
4177 let response = client
4178 .list_services(ListServicesRequest {
4179 sandbox: sandbox.unwrap_or_default().to_string(),
4180 limit,
4181 offset,
4182 })
4183 .await
4184 .map_err(|status| service_status_error("list services", "sandbox:read", status))?
4185 .into_inner();
4186
4187 if response.services.is_empty() {
4188 if let Some(sandbox) = sandbox {
4189 println!("No services exposed for sandbox {sandbox}.");
4190 } else {
4191 println!("No services exposed.");
4192 }
4193 return Ok(());
4194 }
4195
4196 print_service_endpoint_table(&response.services, server);
4197 Ok(())
4198}
4199
4200pub async fn service_get(
4201 server: &str,

Callers 1

mainFunction · 0.85

Calls 5

grpc_clientFunction · 0.85
service_status_errorFunction · 0.85
list_servicesMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected