pub struct TcpNetwork { /* private fields */ }Implementations§
Source§impl TcpNetwork
impl TcpNetwork
pub fn new(peer: RaftNodeInfo, source: TcpNetworkService) -> Self
Trait Implementations§
Source§impl RaftNetwork<TypeConfig> for TcpNetwork
impl RaftNetwork<TypeConfig> for TcpNetwork
Source§async fn vote(
&mut self,
rpc: VoteRequest<<TypeConfig as RaftTypeConfig>::NodeId>,
_option: RPCOption,
) -> Result<VoteResponse<<TypeConfig as RaftTypeConfig>::NodeId>, RPCError<<TypeConfig as RaftTypeConfig>::NodeId, <TypeConfig as RaftTypeConfig>::Node, RaftError<<TypeConfig as RaftTypeConfig>::NodeId>>>
async fn vote( &mut self, rpc: VoteRequest<<TypeConfig as RaftTypeConfig>::NodeId>, _option: RPCOption, ) -> Result<VoteResponse<<TypeConfig as RaftTypeConfig>::NodeId>, RPCError<<TypeConfig as RaftTypeConfig>::NodeId, <TypeConfig as RaftTypeConfig>::Node, RaftError<<TypeConfig as RaftTypeConfig>::NodeId>>>
Send a RequestVote RPC to the target.
Source§async fn append_entries(
&mut self,
rpc: AppendEntriesRequest<TypeConfig>,
_option: RPCOption,
) -> Result<AppendEntriesResponse<<TypeConfig as RaftTypeConfig>::NodeId>, RPCError<<TypeConfig as RaftTypeConfig>::NodeId, <TypeConfig as RaftTypeConfig>::Node, RaftError<<TypeConfig as RaftTypeConfig>::NodeId>>>
async fn append_entries( &mut self, rpc: AppendEntriesRequest<TypeConfig>, _option: RPCOption, ) -> Result<AppendEntriesResponse<<TypeConfig as RaftTypeConfig>::NodeId>, RPCError<<TypeConfig as RaftTypeConfig>::NodeId, <TypeConfig as RaftTypeConfig>::Node, RaftError<<TypeConfig as RaftTypeConfig>::NodeId>>>
Send an AppendEntries RPC to the target.
Source§async fn install_snapshot(
&mut self,
rpc: InstallSnapshotRequest<TypeConfig>,
_option: RPCOption,
) -> Result<InstallSnapshotResponse<<TypeConfig as RaftTypeConfig>::NodeId>, RPCError<<TypeConfig as RaftTypeConfig>::NodeId, <TypeConfig as RaftTypeConfig>::Node, RaftError<<TypeConfig as RaftTypeConfig>::NodeId, InstallSnapshotError>>>
async fn install_snapshot( &mut self, rpc: InstallSnapshotRequest<TypeConfig>, _option: RPCOption, ) -> Result<InstallSnapshotResponse<<TypeConfig as RaftTypeConfig>::NodeId>, RPCError<<TypeConfig as RaftTypeConfig>::NodeId, <TypeConfig as RaftTypeConfig>::Node, RaftError<<TypeConfig as RaftTypeConfig>::NodeId, InstallSnapshotError>>>
Send an InstallSnapshot RPC to the target.
Source§fn full_snapshot(
&mut self,
vote: Vote<<C as RaftTypeConfig>::NodeId>,
snapshot: Snapshot<C>,
cancel: impl Future<Output = ReplicationClosed> + OptionalSend + 'static,
option: RPCOption,
) -> impl Future<Output = Result<SnapshotResponse<<C as RaftTypeConfig>::NodeId>, StreamingError<C, Fatal<<C as RaftTypeConfig>::NodeId>>>> + Send
fn full_snapshot( &mut self, vote: Vote<<C as RaftTypeConfig>::NodeId>, snapshot: Snapshot<C>, cancel: impl Future<Output = ReplicationClosed> + OptionalSend + 'static, option: RPCOption, ) -> impl Future<Output = Result<SnapshotResponse<<C as RaftTypeConfig>::NodeId>, StreamingError<C, Fatal<<C as RaftTypeConfig>::NodeId>>>> + Send
Send a complete Snapshot to the target. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for TcpNetwork
impl !UnwindSafe for TcpNetwork
impl Freeze for TcpNetwork
impl Send for TcpNetwork
impl Sync for TcpNetwork
impl Unpin for TcpNetwork
impl UnsafeUnpin for TcpNetwork
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more