[−][src]Trait async_raft::network::RaftNetwork
A trait defining the interface for a Raft network between cluster members.
See the network chapter of the guide for details and discussion on this trait and how to implement it.
Required methods
#[must_use]fn append_entries<'life0, 'async_trait>(
&'life0 self,
target: NodeId,
rpc: AppendEntriesRequest<D>
) -> Pin<Box<dyn Future<Output = Result<AppendEntriesResponse>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self,
target: NodeId,
rpc: AppendEntriesRequest<D>
) -> Pin<Box<dyn Future<Output = Result<AppendEntriesResponse>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Send an AppendEntries RPC to the target Raft node (§5).
#[must_use]fn install_snapshot<'life0, 'async_trait>(
&'life0 self,
target: NodeId,
rpc: InstallSnapshotRequest
) -> Pin<Box<dyn Future<Output = Result<InstallSnapshotResponse>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self,
target: NodeId,
rpc: InstallSnapshotRequest
) -> Pin<Box<dyn Future<Output = Result<InstallSnapshotResponse>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Send an InstallSnapshot RPC to the target Raft node (§7).
#[must_use]fn vote<'life0, 'async_trait>(
&'life0 self,
target: NodeId,
rpc: VoteRequest
) -> Pin<Box<dyn Future<Output = Result<VoteResponse>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self,
target: NodeId,
rpc: VoteRequest
) -> Pin<Box<dyn Future<Output = Result<VoteResponse>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Send a RequestVote RPC to the target Raft node (§5).