pub struct MountainClient {
channel: Channel,
config: MountainClientConfig,
}Expand description
Mountain gRPC client wrapper for Air.
This struct provides a high-level interface for Air to communicate with Mountain via gRPC. It handles connection lifecycle and provides convenient methods for common operations.
Fields§
§channel: ChannelThe underlying tonic gRPC channel
config: MountainClientConfigClient configuration
Implementations§
Source§impl MountainClient
impl MountainClient
Sourcepub fn channel(&self) -> &Channel
pub fn channel(&self) -> &Channel
Returns a reference to the gRPC channel for creating service clients.
§Returns
Reference to the underlying tonic Channel
Sourcepub fn config(&self) -> &MountainClientConfig
pub fn config(&self) -> &MountainClientConfig
Sourcepub async fn health_check(&self) -> Result<bool, Box<dyn Error>>
pub async fn health_check(&self) -> Result<bool, Box<dyn Error>>
Checks if the connection to Mountain is healthy.
This performs a basic connectivity check on the underlying gRPC channel.
§Returns
Result indicating health status (true if healthy, false otherwise)
Sourcepub async fn get_status(&self) -> Result<String, Box<dyn Error>>
pub async fn get_status(&self) -> Result<String, Box<dyn Error>>
Gets Mountain’s operational status.
This is a stub for future implementation. When the Mountain service exposes a status RPC, this method will call it.
§Returns
Result containing the status or an error
Trait Implementations§
Source§impl Clone for MountainClient
impl Clone for MountainClient
Source§fn clone(&self) -> MountainClient
fn clone(&self) -> MountainClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MountainClient
impl !RefUnwindSafe for MountainClient
impl Send for MountainClient
impl Sync for MountainClient
impl Unpin for MountainClient
impl !UnwindSafe for MountainClient
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].