(
&self,
request: tonic::Request<pb::StopRequest>,
)
| 3416 | } |
| 3417 | |
| 3418 | async fn stop( |
| 3419 | &self, |
| 3420 | request: tonic::Request<pb::StopRequest>, |
| 3421 | ) -> Result<tonic::Response<pb::StopResponse>, tonic::Status> { |
| 3422 | let req = request.into_inner(); |
| 3423 | let req: requests::StopRequest = req.try_into()?; |
| 3424 | debug!("Client asked for stop"); |
| 3425 | trace!("stop request: {:?}", req); |
| 3426 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 3427 | .await |
| 3428 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 3429 | let result = rpc.call(Request::Stop(req)) |
| 3430 | .await |
| 3431 | .map_err(|e| Status::new( |
| 3432 | Code::Unknown, |
| 3433 | format!("Error calling method Stop: {:?}", e)))?; |
| 3434 | match result { |
| 3435 | Response::Stop(r) => { |
| 3436 | trace!("stop response: {:?}", r); |
| 3437 | Ok(tonic::Response::new(r.into())) |
| 3438 | }, |
| 3439 | r => Err(Status::new( |
| 3440 | Code::Internal, |
| 3441 | format!( |
| 3442 | "Unexpected result {:?} to method call Stop", |
| 3443 | r |
| 3444 | ) |
| 3445 | )), |
| 3446 | } |
| 3447 | |
| 3448 | } |
| 3449 | |
| 3450 | async fn help( |
| 3451 | &self, |
nothing calls this directly
no test coverage detected