pub async fn remove(&self, req: RemoveNodeRequest) -> StoreResult<()> {
        let resp = self.redirect_if_needed(&req, true).await?;

        if let Some(forward_resp) = resp {
            match forward_resp {
                ForwardResponse::RemoveNode(_) => return Ok(()),
                _ => panic!("BUG: need JoinResponse"),
            }
        }
        let l = self.as_leader().await;
        match l {
            Ok(l) => l.remove(req.node_id).await,
            Err(e) => return Err(RaftError::ForwardToLeader(e).into()),
        }
    }
// remove the node, specified by id, from the cluster.
remove the node, specified by id, from the cluster.
remove the node specified by id from the cluster .
pub async fn remove(&self, req: RemoveNodeRequest) -> StoreResult<()> {
        let resp = self.redirect_if_needed(&req, true).await?;
        if let Some(forward_resp) = resp {
            match forward_resp {
                ForwardResponse::RemoveNode(_) => return Ok(()),
                _ => panic!("BUG: need JoinResponse"),
            }
        }
        let l = self.as_leader().await;
        match l {
            Ok(l) => l.remove(req.node_id).await,
            Err(e) => return Err(RaftError::ForwardToLeader(e).into()),
        }
    }
pub async fn remove ( & self , req : RemoveNodeRequest ) -> StoreResult < ( ) > { let resp = self . redirect_if_needed ( & req , true ) . await ? ; if let Some ( forward_resp ) = resp { match forward_resp { ForwardResponse :: RemoveNode ( _ ) => return Ok ( ( ) ) , _ => panic ! ( " " ) , } } let l = self . as_leader ( ) . await ; match l { Ok ( l ) => l . remove ( req . node_id ) . await , Err ( e ) => return Err ( RaftError :: ForwardToLeader ( e ) . into ( ) ) , } }
remove the node, specified by id, from the cluster.
remove the node specified by id from the cluster .
&self
req
RemoveNodeRequest
&self
req
RemoveNodeRequest