| 318 | |
| 319 | impl Service { |
| 320 | pub fn status(&self, request: pb::StatusRequest) -> CliResult<pb::StatusResponse> { |
| 321 | self.call(move |backend| async move { |
| 322 | match backend { |
| 323 | Backend::Local(state) => services::QueryImpl { state } |
| 324 | .status(Request::new(request)) |
| 325 | .await |
| 326 | .map(|response| response.into_inner()), |
| 327 | Backend::Reactor(channel) => { |
| 328 | let mut query = |
| 329 | pb::repository_query_service_client::RepositoryQueryServiceClient::new( |
| 330 | channel, |
| 331 | ); |
| 332 | query |
| 333 | .status(request) |
| 334 | .await |
| 335 | .map(|response| response.into_inner()) |
| 336 | } |
| 337 | } |
| 338 | }) |
| 339 | } |
| 340 | |
| 341 | pub fn log(&self, request: pb::LogRequest) -> CliResult<pb::LogResponse> { |
| 342 | // all_views / path_filter / tags_only ride the request as-is. |