pub struct ClusterNodeClient { /* private fields */ }Expand description
NodeClient used in cluster environment that connects to node through a controller instead
of to the node directly
Implementations§
Source§impl ClusterNodeClient
impl ClusterNodeClient
Sourcepub fn new(nats_client: NatsClient) -> Self
pub fn new(nats_client: NatsClient) -> Self
Create a new instance
Trait Implementations§
Source§impl Clone for ClusterNodeClient
impl Clone for ClusterNodeClient
Source§impl Debug for ClusterNodeClient
impl Debug for ClusterNodeClient
Source§impl NodeClient for ClusterNodeClient
impl NodeClient for ClusterNodeClient
Source§fn farmer_app_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FarmerAppInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn farmer_app_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FarmerAppInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get farmer app info
Source§fn subscribe_slot_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = SlotInfo> + Send + 'static>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_slot_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = SlotInfo> + Send + 'static>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Subscribe to slot
Source§fn submit_solution_response<'life0, 'async_trait>(
&'life0 self,
solution_response: SolutionResponse,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_solution_response<'life0, 'async_trait>(
&'life0 self,
solution_response: SolutionResponse,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submit a slot solution
Source§fn subscribe_block_sealing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = BlockSealInfo> + Send + 'static>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_block_sealing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = BlockSealInfo> + Send + 'static>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Subscribe to block sealing requests
Source§fn submit_block_seal<'life0, 'async_trait>(
&'life0 self,
block_seal: BlockSealResponse,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_block_seal<'life0, 'async_trait>(
&'life0 self,
block_seal: BlockSealResponse,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submit a block seal
Source§fn subscribe_new_super_segment_headers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = SuperSegmentHeader> + Send + 'static>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_new_super_segment_headers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = SuperSegmentHeader> + Send + 'static>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Subscribe to new super segment headers
Source§fn super_segment_headers<'life0, 'async_trait>(
&'life0 self,
super_segment_indices: Vec<SuperSegmentIndex>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SuperSegmentHeader>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn super_segment_headers<'life0, 'async_trait>(
&'life0 self,
super_segment_indices: Vec<SuperSegmentIndex>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<SuperSegmentHeader>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get super segment headers
Source§fn super_segment_header_for_segment_index<'life0, 'async_trait>(
&'life0 self,
segment_index: SegmentIndex,
) -> Pin<Box<dyn Future<Output = Result<Option<SuperSegmentHeader>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn super_segment_header_for_segment_index<'life0, 'async_trait>(
&'life0 self,
segment_index: SegmentIndex,
) -> Pin<Box<dyn Future<Output = Result<Option<SuperSegmentHeader>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the header of the super segment that contains a segment
Source§fn piece<'life0, 'async_trait>(
&'life0 self,
piece_index: PieceIndex,
) -> Pin<Box<dyn Future<Output = Result<Option<Piece>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn piece<'life0, 'async_trait>(
&'life0 self,
piece_index: PieceIndex,
) -> Pin<Box<dyn Future<Output = Result<Option<Piece>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get piece by index
Source§fn update_shard_membership_info<'life0, 'async_trait>(
&'life0 self,
_info: FarmerShardMembershipInfo,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_shard_membership_info<'life0, 'async_trait>(
&'life0 self,
_info: FarmerShardMembershipInfo,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Must be called while there is an active
shard_membership_entropy_update subscriptionAuto Trait Implementations§
impl !RefUnwindSafe for ClusterNodeClient
impl !UnwindSafe for ClusterNodeClient
impl Forget for ClusterNodeClient
impl Freeze for ClusterNodeClientwhere
*const ArcInner<Inner> is !null: Freeze,
PhantomData<Inner>: Freeze,
*const ArcInner<Mutex<RawMutex, String>> is !null: Freeze,
PhantomData<Mutex<RawMutex, String>>: Freeze,
impl Move for ClusterNodeClient
impl Send for ClusterNodeClient
impl Sync for ClusterNodeClient
impl Unpin for ClusterNodeClientwhere
*const ArcInner<Inner> is !null: Unpin,
Arc<Shared<Option<ServerInfo>>>: Unpin,
Arc<Shared<State>>: Unpin,
Arc<Chan<Command, Semaphore>>: Unpin,
Box<dyn Future<Output = Result<OwnedPermit<Command>, PollSendError<Command>>> + Send>: Unpin,
Arc<AtomicU64>: Unpin,
Arc<str>: Unpin,
Arc<Atomic<usize>>: Unpin,
Arc<Statistics>: Unpin,
*const ArcInner<Mutex<RawMutex, String>> is !null: Unpin,
Align1<u8>: Unpin,
*const u8 is !null: Unpin,
impl UnsafeUnpin for ClusterNodeClientwhere
*const ArcInner<Inner> is !null: UnsafeUnpin,
PhantomData<Inner>: UnsafeUnpin,
*const ArcInner<Mutex<RawMutex, String>> is !null: UnsafeUnpin,
PhantomData<Mutex<RawMutex, String>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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 more