pub struct AgentServiceClient<Stub = Channel<AgentServiceRequest, AgentServiceResponse>>(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
Source§impl AgentServiceClient
impl AgentServiceClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<AgentServiceRequest, AgentServiceResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<AgentServiceRequest, AgentServiceResponse, T>>
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> AgentServiceClient<Stub>
impl<Stub> AgentServiceClient<Stub>
Sourcepub fn handshake(
&self,
ctx: Context,
handshake: Handshake,
) -> impl Future<Output = Result<Result<(), ReconcileError>, RpcError>> + '_
pub fn handshake( &self, ctx: Context, handshake: Handshake, ) -> impl Future<Output = Result<Result<(), ReconcileError>, RpcError>> + '_
Handshake with some initial connection details.
Sourcepub fn get_addrs(
&self,
ctx: Context,
) -> impl Future<Output = Result<(PortConfig, Option<IpAddr>, Vec<IpAddr>), RpcError>> + '_
pub fn get_addrs( &self, ctx: Context, ) -> impl Future<Output = Result<(PortConfig, Option<IpAddr>, Vec<IpAddr>), RpcError>> + '_
Control plane asks the agent for its external network address, along with local addrs.
Sourcepub fn reconcile(
&self,
ctx: Context,
to: AgentState,
) -> impl Future<Output = Result<Result<(), ReconcileError>, RpcError>> + '_
pub fn reconcile( &self, ctx: Context, to: AgentState, ) -> impl Future<Output = Result<Result<(), ReconcileError>, RpcError>> + '_
Control plane instructs the agent to reconcile towards a particular state.
Sourcepub fn broadcast_tx(
&self,
ctx: Context,
tx: String,
) -> impl Future<Output = Result<Result<(), AgentError>, RpcError>> + '_
pub fn broadcast_tx( &self, ctx: Context, tx: String, ) -> impl Future<Output = Result<Result<(), AgentError>, RpcError>> + '_
Broadcast a transaction locally
Sourcepub fn snarkos_get(
&self,
ctx: Context,
route: String,
) -> impl Future<Output = Result<Result<String, SnarkosRequestError>, RpcError>> + '_
pub fn snarkos_get( &self, ctx: Context, route: String, ) -> impl Future<Output = Result<Result<String, SnarkosRequestError>, RpcError>> + '_
Make a GET request to the snarkos server
Sourcepub fn kill(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn kill( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
Close the agent process
Locally execute an authorization, using the given query environment id is passed so the agent can determine which aot binary to use
pub fn get_metric( &self, ctx: Context, metric: AgentMetric, ) -> impl Future<Output = Result<f64, RpcError>> + '_
pub fn set_log_level( &self, ctx: Context, level: String, ) -> impl Future<Output = Result<Result<(), AgentError>, RpcError>> + '_
Sourcepub fn find_transaction(
&self,
ctx: Context,
tx_id: String,
) -> impl Future<Output = Result<Result<Option<String>, AgentError>, RpcError>> + '_
pub fn find_transaction( &self, ctx: Context, tx_id: String, ) -> impl Future<Output = Result<Result<Option<String>, AgentError>, RpcError>> + '_
Find a transaction’s block hash by its transaction id
Sourcepub fn get_snarkos_block_lite(
&self,
ctx: Context,
block_hash: String,
) -> impl Future<Output = Result<Result<Option<SnarkOSLiteBlock>, AgentError>, RpcError>> + '_
pub fn get_snarkos_block_lite( &self, ctx: Context, block_hash: String, ) -> impl Future<Output = Result<Result<Option<SnarkOSLiteBlock>, AgentError>, RpcError>> + '_
Get a block info and transaction data from the agent’s running node
pub fn set_aot_log_level( &self, ctx: Context, verbosity: u8, ) -> impl Future<Output = Result<Result<(), AgentError>, RpcError>> + '_
pub fn get_status( &self, ctx: Context, ) -> impl Future<Output = Result<Result<AgentStatus, AgentError>, RpcError>> + '_
Trait Implementations§
Source§impl<Stub: Clone> Clone for AgentServiceClient<Stub>
impl<Stub: Clone> Clone for AgentServiceClient<Stub>
Source§fn clone(&self) -> AgentServiceClient<Stub>
fn clone(&self) -> AgentServiceClient<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 AgentServiceClient<Stub>
impl<Stub: Debug> Debug for AgentServiceClient<Stub>
Source§impl<Stub> From<Stub> for AgentServiceClient<Stub>
impl<Stub> From<Stub> for AgentServiceClient<Stub>
Auto Trait Implementations§
impl<Stub> Freeze for AgentServiceClient<Stub>where
Stub: Freeze,
impl<Stub> RefUnwindSafe for AgentServiceClient<Stub>where
Stub: RefUnwindSafe,
impl<Stub> Send for AgentServiceClient<Stub>where
Stub: Send,
impl<Stub> Sync for AgentServiceClient<Stub>where
Stub: Sync,
impl<Stub> Unpin for AgentServiceClient<Stub>where
Stub: Unpin,
impl<Stub> UnwindSafe for AgentServiceClient<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