MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / handle_rpc

Method handle_rpc

nodedb-cluster/src/bootstrap/join.rs:508–520  ·  view source on GitHub ↗
(&self, rpc: RaftRpc)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 4

handle_join_requestFunction · 0.85
JoinResponseClass · 0.85
writeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected