(
server: &str,
sandbox: Option<&str>,
limit: u32,
offset: u32,
tls: &TlsOptions,
)
| 4167 | } |
| 4168 | |
| 4169 | pub 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 | |
| 4200 | pub async fn service_get( |
| 4201 | server: &str, |
no test coverage detected