pub struct SimpleHermesRpcQuerier;Expand description
SimpleHermesRpcQuerier retrieves HermesConfigData by querying a list of RPC endpoints
through their RPC API and returns the result of the first endpoint to answer.
Trait Implementations§
source§impl QueryContext for SimpleHermesRpcQuerier
impl QueryContext for SimpleHermesRpcQuerier
source§fn query_error(chain_name: String) -> RegistryError
fn query_error(chain_name: String) -> RegistryError
Return an error NoHealthyRpc when query_healthy fails
source§fn query<'async_trait>(
rpc_url: Self::QueryInput,
) -> Pin<Box<dyn Future<Output = Result<Self::QueryOutput, Self::QueryError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn query<'async_trait>(
rpc_url: Self::QueryInput,
) -> Pin<Box<dyn Future<Output = Result<Self::QueryOutput, Self::QueryError>> + Send + 'async_trait>>where
Self: 'async_trait,
Query the endpoint, return the data from the RPC.
source§fn query_healthy<'async_trait>(
chain_name: String,
urls: Vec<Self::QueryInput>,
) -> Pin<Box<dyn Future<Output = Result<Self::QueryOutput, Self::QueryError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
fn query_healthy<'async_trait>(
chain_name: String,
urls: Vec<Self::QueryInput>,
) -> Pin<Box<dyn Future<Output = Result<Self::QueryOutput, Self::QueryError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
Query every endpoint from a list of urls and return the output of the first one to answer. Read more
source§impl QueryTypes for SimpleHermesRpcQuerier
impl QueryTypes for SimpleHermesRpcQuerier
Expected Input, Output and Error to query an RPC endpoint
§type QueryInput = String
type QueryInput = String
QueryInput represents the data needed to query a node. It is typically a URL§type QueryOutput = HermesConfigData
type QueryOutput = HermesConfigData
QueryOutput represents the data returned by your query§type QueryError = RegistryError
type QueryError = RegistryError
QueryOutput represents the error returned when a query failsAuto Trait Implementations§
impl Freeze for SimpleHermesRpcQuerier
impl RefUnwindSafe for SimpleHermesRpcQuerier
impl Send for SimpleHermesRpcQuerier
impl Sync for SimpleHermesRpcQuerier
impl Unpin for SimpleHermesRpcQuerier
impl UnwindSafe for SimpleHermesRpcQuerier
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> 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>
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request