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