pub struct MockNode;Implementations§
Source§impl MockNode
impl MockNode
pub async fn mock_listener( mock_service: MockRpcService, rx: Receiver<()>, is_ready: bool, ) -> Result<(u16, SocketAddr)>
pub async fn mock_channel_with_port(port: u16) -> Channel
pub fn tcp_addr_to_http_addr(addr: String) -> String
pub async fn simulate_send_votes_mock_server( response: VoteResponse, rx: Receiver<()>, ) -> Result<(Channel, u16)>
pub async fn simulate_purge_mock_server( response: PurgeLogResponse, rx: Receiver<()>, ) -> Result<(Channel, u16)>
pub async fn simulate_snapshot_mock_server( response: Result<SnapshotResponse, Status>, rx: Receiver<()>, ) -> Result<(Channel, u16)>
pub async fn simulate_mock_service_with_cluster_conf_reps( rx: Receiver<()>, response_builder: Option<Box<dyn Fn(u16) -> Result<ClusterMembership, Status> + Send + Sync>>, ) -> Result<(Channel, u16)>
pub async fn simulate_append_entries_mock_server( response: Result<AppendEntriesResponse, Status>, rx: Receiver<()>, ) -> Result<(Channel, u16)>
pub async fn simulate_mock_service_with_join_cluster_reps( rx: Receiver<()>, metadata_response_builder: Option<Box<dyn Fn(u16) -> Result<ClusterMembership, Status> + Send + Sync>>, join_response: Result<JoinResponse, Status>, ) -> Result<(Channel, u16)>
pub async fn simulate_client_read_mock_server( rx: Receiver<()>, metadata_response_builder: Option<Box<dyn Fn(u16) -> Result<ClusterMembership, Status> + Send + Sync>>, response: ClientResponse, ) -> Result<(Channel, u16)>
pub async fn simulate_client_write_mock_server( rx: Receiver<()>, metadata_response_builder: Option<Box<dyn Fn(u16) -> Result<ClusterMembership, Status> + Send + Sync>>, response: ClientResponse, ) -> Result<(Channel, u16)>
Auto Trait Implementations§
impl Freeze for MockNode
impl RefUnwindSafe for MockNode
impl Send for MockNode
impl Sync for MockNode
impl Unpin for MockNode
impl UnwindSafe for MockNode
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> 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> 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