(&self, rpc: RaftRpc)
| 506 | |
| 507 | impl crate::transport::RaftRpcHandler for JoinHandler { |
| 508 | async fn handle_rpc(&self, rpc: RaftRpc) -> Result<RaftRpc> { |
| 509 | match rpc { |
| 510 | RaftRpc::JoinRequest(req) => { |
| 511 | let mut topo = self.topology.write().unwrap(); |
| 512 | let routing = self.routing.read().unwrap(); |
| 513 | let resp = handle_join_request(&req, &mut topo, &routing, 99); |
| 514 | Ok(RaftRpc::JoinResponse(resp)) |
| 515 | } |
| 516 | other => Err(ClusterError::Transport { |
| 517 | detail: format!("unexpected: {other:?}"), |
| 518 | }), |
| 519 | } |
| 520 | } |
| 521 | } |
| 522 | |
| 523 | let handler = Arc::new(JoinHandler { |
nothing calls this directly
no test coverage detected