pub struct ControlServerClient<Stub = Channel<ControlServerRequest, ControlServerResponse>>(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
Source§impl ControlServerClient
impl ControlServerClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<ControlServerRequest, ControlServerResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<ControlServerRequest, ControlServerResponse, T>>
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> ControlServerClient<Stub>
impl<Stub> ControlServerClient<Stub>
Sourcepub fn ping(
&self,
ctx: Context,
) -> impl Future<Output = Result<u64, RpcError>> + '_
pub fn ping( &self, ctx: Context, ) -> impl Future<Output = Result<u64, RpcError>> + '_
Ping a node. Returns node timestamp in milliseconds.
Sourcepub fn get_status(
&self,
ctx: Context,
) -> impl Future<Output = Result<ServerResult<NodeStatusResponse>, RpcError>> + '_
pub fn get_status( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<NodeStatusResponse>, RpcError>> + '_
Get node status.
Sourcepub fn trigger_archives_gc(
&self,
ctx: Context,
req: TriggerGcRequest,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn trigger_archives_gc( &self, ctx: Context, req: TriggerGcRequest, ) -> impl Future<Output = Result<(), RpcError>> + '_
Trigger manual GC for archives.
Sourcepub fn trigger_blocks_gc(
&self,
ctx: Context,
req: TriggerGcRequest,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn trigger_blocks_gc( &self, ctx: Context, req: TriggerGcRequest, ) -> impl Future<Output = Result<(), RpcError>> + '_
Trigger manual GC for blocks.
Sourcepub fn trigger_states_gc(
&self,
ctx: Context,
req: TriggerGcRequest,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn trigger_states_gc( &self, ctx: Context, req: TriggerGcRequest, ) -> impl Future<Output = Result<(), RpcError>> + '_
Trigger manual GC for states.
Sourcepub fn trigger_compaction(
&self,
ctx: Context,
req: TriggerCompactionRequest,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn trigger_compaction( &self, ctx: Context, req: TriggerCompactionRequest, ) -> impl Future<Output = Result<(), RpcError>> + '_
Trigger manual compaction.
Sourcepub fn set_memory_profiler_enabled(
&self,
ctx: Context,
enabled: bool,
) -> impl Future<Output = Result<bool, RpcError>> + '_
pub fn set_memory_profiler_enabled( &self, ctx: Context, enabled: bool, ) -> impl Future<Output = Result<bool, RpcError>> + '_
Sets memory profiler state. Returns whether the state was changed.
Sourcepub fn dump_memory_profiler(
&self,
ctx: Context,
) -> impl Future<Output = Result<ServerResult<Vec<u8>>, RpcError>> + '_
pub fn dump_memory_profiler( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<Vec<u8>>, RpcError>> + '_
Returns memory profiler dump.
Sourcepub fn get_neighbours_info(
&self,
ctx: Context,
) -> impl Future<Output = Result<ServerResult<NeighboursInfoResponse>, RpcError>> + '_
pub fn get_neighbours_info( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<NeighboursInfoResponse>, RpcError>> + '_
Get node neighbours info
Sourcepub fn broadcast_external_message(
&self,
ctx: Context,
req: BroadcastExtMsgRequest,
) -> impl Future<Output = Result<ServerResult<()>, RpcError>> + '_
pub fn broadcast_external_message( &self, ctx: Context, req: BroadcastExtMsgRequest, ) -> impl Future<Output = Result<ServerResult<()>, RpcError>> + '_
Broadcast a message to validators.
Sourcepub fn get_account_state(
&self,
ctx: Context,
req: AccountStateRequest,
) -> impl Future<Output = Result<ServerResult<AccountStateResponse>, RpcError>> + '_
pub fn get_account_state( &self, ctx: Context, req: AccountStateRequest, ) -> impl Future<Output = Result<ServerResult<AccountStateResponse>, RpcError>> + '_
Get account state.
Sourcepub fn get_blockchain_config(
&self,
ctx: Context,
) -> impl Future<Output = Result<ServerResult<BlockchainConfigResponse>, RpcError>> + '_
pub fn get_blockchain_config( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<BlockchainConfigResponse>, RpcError>> + '_
Get blockchain config.
Sourcepub fn get_block(
&self,
ctx: Context,
req: BlockRequest,
) -> impl Future<Output = Result<ServerResult<BlockResponse>, RpcError>> + '_
pub fn get_block( &self, ctx: Context, req: BlockRequest, ) -> impl Future<Output = Result<ServerResult<BlockResponse>, RpcError>> + '_
Get block bytes
Sourcepub fn get_block_proof(
&self,
ctx: Context,
req: BlockRequest,
) -> impl Future<Output = Result<ServerResult<BlockResponse>, RpcError>> + '_
pub fn get_block_proof( &self, ctx: Context, req: BlockRequest, ) -> impl Future<Output = Result<ServerResult<BlockResponse>, RpcError>> + '_
Get proof bytes.
Sourcepub fn get_queue_diff(
&self,
ctx: Context,
req: BlockRequest,
) -> impl Future<Output = Result<ServerResult<BlockResponse>, RpcError>> + '_
pub fn get_queue_diff( &self, ctx: Context, req: BlockRequest, ) -> impl Future<Output = Result<ServerResult<BlockResponse>, RpcError>> + '_
Get queue bytes.
Sourcepub fn get_archive_info(
&self,
ctx: Context,
req: ArchiveInfoRequest,
) -> impl Future<Output = Result<ServerResult<ArchiveInfoResponse>, RpcError>> + '_
pub fn get_archive_info( &self, ctx: Context, req: ArchiveInfoRequest, ) -> impl Future<Output = Result<ServerResult<ArchiveInfoResponse>, RpcError>> + '_
Get archive id
Sourcepub fn get_archive_chunk(
&self,
ctx: Context,
req: ArchiveSliceRequest,
) -> impl Future<Output = Result<ServerResult<ArchiveSliceResponse>, RpcError>> + '_
pub fn get_archive_chunk( &self, ctx: Context, req: ArchiveSliceRequest, ) -> impl Future<Output = Result<ServerResult<ArchiveSliceResponse>, RpcError>> + '_
Download archive slice.
Sourcepub fn get_archive_ids(
&self,
ctx: Context,
) -> impl Future<Output = Result<ServerResult<Vec<ArchiveInfo>>, RpcError>> + '_
pub fn get_archive_ids( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<Vec<ArchiveInfo>>, RpcError>> + '_
Returns list of all archive ids.
Sourcepub fn get_block_ids(
&self,
ctx: Context,
req: BlockListRequest,
) -> impl Future<Output = Result<ServerResult<BlockListResponse>, RpcError>> + '_
pub fn get_block_ids( &self, ctx: Context, req: BlockListRequest, ) -> impl Future<Output = Result<ServerResult<BlockListResponse>, RpcError>> + '_
Returns list of all block ids.
Sourcepub fn get_overlay_ids(
&self,
ctx: Context,
) -> impl Future<Output = Result<ServerResult<OverlayIdsResponse>, RpcError>> + '_
pub fn get_overlay_ids( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<OverlayIdsResponse>, RpcError>> + '_
Returns list of all overlays.
Sourcepub fn get_overlay_peers(
&self,
ctx: Context,
req: OverlayPeersRequest,
) -> impl Future<Output = Result<ServerResult<OverlayPeersResponse>, RpcError>> + '_
pub fn get_overlay_peers( &self, ctx: Context, req: OverlayPeersRequest, ) -> impl Future<Output = Result<ServerResult<OverlayPeersResponse>, RpcError>> + '_
Get overlay peers.
Sourcepub fn dht_find_node(
&self,
ctx: Context,
req: DhtFindNodeRequest,
) -> impl Future<Output = Result<ServerResult<DhtFindNodeResponse>, RpcError>> + '_
pub fn dht_find_node( &self, ctx: Context, req: DhtFindNodeRequest, ) -> impl Future<Output = Result<ServerResult<DhtFindNodeResponse>, RpcError>> + '_
Search for k closest nodes known to peer_id that store key.
Sourcepub fn sign_elections_payload(
&self,
ctx: Context,
req: ElectionsPayloadRequest,
) -> impl Future<Output = Result<ServerResult<ElectionsPayloadResponse>, RpcError>> + '_
pub fn sign_elections_payload( &self, ctx: Context, req: ElectionsPayloadRequest, ) -> impl Future<Output = Result<ServerResult<ElectionsPayloadResponse>, RpcError>> + '_
Signs an elections payload.
Trait Implementations§
Source§impl<Stub: Clone> Clone for ControlServerClient<Stub>
impl<Stub: Clone> Clone for ControlServerClient<Stub>
Source§fn clone(&self) -> ControlServerClient<Stub>
fn clone(&self) -> ControlServerClient<Stub>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<Stub: Debug> Debug for ControlServerClient<Stub>
impl<Stub: Debug> Debug for ControlServerClient<Stub>
Source§impl<Stub> From<Stub> for ControlServerClient<Stub>
impl<Stub> From<Stub> for ControlServerClient<Stub>
Auto Trait Implementations§
impl<Stub> Freeze for ControlServerClient<Stub>where
Stub: Freeze,
impl<Stub> RefUnwindSafe for ControlServerClient<Stub>where
Stub: RefUnwindSafe,
impl<Stub> Send for ControlServerClient<Stub>where
Stub: Send,
impl<Stub> Sync for ControlServerClient<Stub>where
Stub: Sync,
impl<Stub> Unpin for ControlServerClient<Stub>where
Stub: Unpin,
impl<Stub> UnwindSafe for ControlServerClient<Stub>where
Stub: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<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>
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>
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