pub struct NetworkConnection { /* private fields */ }Expand description
A single HTTP connection to a Raft peer node.
Trait Implementations§
Source§impl RaftNetwork<OrcaTypeConfig> for NetworkConnection
impl RaftNetwork<OrcaTypeConfig> for NetworkConnection
Source§async fn append_entries(
&mut self,
rpc: AppendEntriesRequest<OrcaTypeConfig>,
_option: RPCOption,
) -> Result<AppendEntriesResponse<u64>, RPCError<u64, BasicNode, RaftError<u64>>>
async fn append_entries( &mut self, rpc: AppendEntriesRequest<OrcaTypeConfig>, _option: RPCOption, ) -> Result<AppendEntriesResponse<u64>, RPCError<u64, BasicNode, RaftError<u64>>>
Send an AppendEntries RPC to the target.
Source§async fn install_snapshot(
&mut self,
rpc: InstallSnapshotRequest<OrcaTypeConfig>,
_option: RPCOption,
) -> Result<InstallSnapshotResponse<u64>, RPCError<u64, BasicNode, RaftError<u64, InstallSnapshotError>>>
async fn install_snapshot( &mut self, rpc: InstallSnapshotRequest<OrcaTypeConfig>, _option: RPCOption, ) -> Result<InstallSnapshotResponse<u64>, RPCError<u64, BasicNode, RaftError<u64, InstallSnapshotError>>>
Send an InstallSnapshot RPC to the target.
Source§async fn vote(
&mut self,
rpc: VoteRequest<u64>,
_option: RPCOption,
) -> Result<VoteResponse<u64>, RPCError<u64, BasicNode, RaftError<u64>>>
async fn vote( &mut self, rpc: VoteRequest<u64>, _option: RPCOption, ) -> Result<VoteResponse<u64>, RPCError<u64, BasicNode, RaftError<u64>>>
Send a RequestVote 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 Freeze for NetworkConnection
impl !RefUnwindSafe for NetworkConnection
impl Send for NetworkConnection
impl Sync for NetworkConnection
impl Unpin for NetworkConnection
impl UnsafeUnpin for NetworkConnection
impl !UnwindSafe for NetworkConnection
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
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request