Skip to main content

ControlServerClient

Struct ControlServerClient 

Source
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

Source

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>
where Stub: Stub<Req = ControlServerRequest, Resp = ControlServerResponse>,

Source

pub fn ping( &self, ctx: Context, ) -> impl Future<Output = Result<u64, RpcError>> + '_

Ping a node. Returns node timestamp in milliseconds.

Source

pub fn get_status( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<NodeStatusResponse>, RpcError>> + '_

Get node status.

Source

pub fn trigger_archives_gc( &self, ctx: Context, req: TriggerGcRequest, ) -> impl Future<Output = Result<(), RpcError>> + '_

Trigger manual GC for archives.

Source

pub fn trigger_blocks_gc( &self, ctx: Context, req: TriggerGcRequest, ) -> impl Future<Output = Result<(), RpcError>> + '_

Trigger manual GC for blocks.

Source

pub fn trigger_states_gc( &self, ctx: Context, req: TriggerGcRequest, ) -> impl Future<Output = Result<(), RpcError>> + '_

Trigger manual GC for states.

Source

pub fn trigger_compaction( &self, ctx: Context, req: TriggerCompactionRequest, ) -> impl Future<Output = Result<(), RpcError>> + '_

Trigger manual compaction.

Source

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.

Source

pub fn dump_memory_profiler( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<Vec<u8>>, RpcError>> + '_

Returns memory profiler dump.

Source

pub fn get_neighbours_info( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<NeighboursInfoResponse>, RpcError>> + '_

Get node neighbours info

Source

pub fn broadcast_external_message( &self, ctx: Context, req: BroadcastExtMsgRequest, ) -> impl Future<Output = Result<ServerResult<()>, RpcError>> + '_

Broadcast a message to validators.

Source

pub fn get_account_state( &self, ctx: Context, req: AccountStateRequest, ) -> impl Future<Output = Result<ServerResult<AccountStateResponse>, RpcError>> + '_

Get account state.

Source

pub fn get_blockchain_config( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<BlockchainConfigResponse>, RpcError>> + '_

Get blockchain config.

Source

pub fn get_block( &self, ctx: Context, req: BlockRequest, ) -> impl Future<Output = Result<ServerResult<BlockResponse>, RpcError>> + '_

Get block bytes

Source

pub fn get_block_proof( &self, ctx: Context, req: BlockRequest, ) -> impl Future<Output = Result<ServerResult<BlockResponse>, RpcError>> + '_

Get proof bytes.

Source

pub fn get_queue_diff( &self, ctx: Context, req: BlockRequest, ) -> impl Future<Output = Result<ServerResult<BlockResponse>, RpcError>> + '_

Get queue bytes.

Source

pub fn get_archive_info( &self, ctx: Context, req: ArchiveInfoRequest, ) -> impl Future<Output = Result<ServerResult<ArchiveInfoResponse>, RpcError>> + '_

Get archive id

Source

pub fn get_archive_chunk( &self, ctx: Context, req: ArchiveSliceRequest, ) -> impl Future<Output = Result<ServerResult<ArchiveSliceResponse>, RpcError>> + '_

Download archive slice.

Source

pub fn get_archive_ids( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<Vec<ArchiveInfo>>, RpcError>> + '_

Returns list of all archive ids.

Source

pub fn get_block_ids( &self, ctx: Context, req: BlockListRequest, ) -> impl Future<Output = Result<ServerResult<BlockListResponse>, RpcError>> + '_

Returns list of all block ids.

Source

pub fn get_overlay_ids( &self, ctx: Context, ) -> impl Future<Output = Result<ServerResult<OverlayIdsResponse>, RpcError>> + '_

Returns list of all overlays.

Source

pub fn get_overlay_peers( &self, ctx: Context, req: OverlayPeersRequest, ) -> impl Future<Output = Result<ServerResult<OverlayPeersResponse>, RpcError>> + '_

Get overlay peers.

Source

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.

Source

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>

Source§

fn clone(&self) -> ControlServerClient<Stub>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Stub: Debug> Debug for ControlServerClient<Stub>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Stub> From<Stub> for ControlServerClient<Stub>
where Stub: Stub<Req = ControlServerRequest, Resp = ControlServerResponse>,

Source§

fn from(stub: Stub) -> Self

Returns a new client stub that sends requests over the given transport.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> EquivalentRepr<T> for T