pub struct ControlServiceClient<Stub = Channel<ControlServiceRequest, ControlServiceResponse>>(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
Source§impl ControlServiceClient
impl ControlServiceClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<ControlServiceRequest, ControlServiceResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<ControlServiceRequest, ControlServiceResponse, T>>
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> ControlServiceClient<Stub>
impl<Stub> ControlServiceClient<Stub>
Sourcepub fn resolve_addrs(
&self,
ctx: Context,
peers: HashSet<AgentId>,
) -> impl Future<Output = Result<Result<HashMap<AgentId, IpAddr>, ResolveError>, RpcError>> + '_
pub fn resolve_addrs( &self, ctx: Context, peers: HashSet<AgentId>, ) -> impl Future<Output = Result<Result<HashMap<AgentId, IpAddr>, ResolveError>, RpcError>> + '_
Resolve the addresses of the given agents.
Sourcepub fn get_env_info(
&self,
ctx: Context,
env_id: EnvId,
) -> impl Future<Output = Result<Option<EnvInfo>, RpcError>> + '_
pub fn get_env_info( &self, ctx: Context, env_id: EnvId, ) -> impl Future<Output = Result<Option<EnvInfo>, RpcError>> + '_
Get the environment info for the given environment.
Sourcepub fn post_transfer_status(
&self,
ctx: Context,
id: u32,
status: TransferStatusUpdate,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn post_transfer_status( &self, ctx: Context, id: u32, status: TransferStatusUpdate, ) -> impl Future<Output = Result<(), RpcError>> + '_
Emit an agent transfer status update.
Sourcepub fn post_transfer_statuses(
&self,
ctx: Context,
statuses: Vec<(u32, TransferStatus)>,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn post_transfer_statuses( &self, ctx: Context, statuses: Vec<(u32, TransferStatus)>, ) -> impl Future<Output = Result<(), RpcError>> + '_
Emit current agent transfers. Will overwrite old status.
Sourcepub fn post_block_status(
&self,
ctx: Context,
height: u32,
timestamp: i64,
state_root: String,
block_hash: String,
prev_block_hash: String,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn post_block_status( &self, ctx: Context, height: u32, timestamp: i64, state_root: String, block_hash: String, prev_block_hash: String, ) -> impl Future<Output = Result<(), RpcError>> + '_
Emit an agent block status update.
Sourcepub fn post_node_status(
&self,
ctx: Context,
update: NodeStatus,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn post_node_status( &self, ctx: Context, update: NodeStatus, ) -> impl Future<Output = Result<(), RpcError>> + '_
Emit an agent node status update.
Trait Implementations§
Source§impl<Stub: Clone> Clone for ControlServiceClient<Stub>
impl<Stub: Clone> Clone for ControlServiceClient<Stub>
Source§fn clone(&self) -> ControlServiceClient<Stub>
fn clone(&self) -> ControlServiceClient<Stub>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Stub: Debug> Debug for ControlServiceClient<Stub>
impl<Stub: Debug> Debug for ControlServiceClient<Stub>
Source§impl<Stub> From<Stub> for ControlServiceClient<Stub>
impl<Stub> From<Stub> for ControlServiceClient<Stub>
Auto Trait Implementations§
impl<Stub> Freeze for ControlServiceClient<Stub>where
Stub: Freeze,
impl<Stub> RefUnwindSafe for ControlServiceClient<Stub>where
Stub: RefUnwindSafe,
impl<Stub> Send for ControlServiceClient<Stub>where
Stub: Send,
impl<Stub> Sync for ControlServiceClient<Stub>where
Stub: Sync,
impl<Stub> Unpin for ControlServiceClient<Stub>where
Stub: Unpin,
impl<Stub> UnwindSafe for ControlServiceClient<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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more