Trait agreed::network::RaftNetwork [−][src]
pub trait RaftNetwork<D>: Send + Sync + 'static where
D: AppData, { #[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; #[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; #[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; }
Expand description
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,
[src]
#[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,
Expand description
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,
[src]
#[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,
Expand description
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,
[src]
#[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,
Expand description
Send a RequestVote RPC to the target Raft node (§5).