pub struct CrpcEndhostApiClient { /* private fields */ }Expand description
Connect RPC endhost API client.
Implementations§
Source§impl CrpcEndhostApiClient
impl CrpcEndhostApiClient
Sourcepub fn new(base_url: &Url) -> Result<Self>
pub fn new(base_url: &Url) -> Result<Self>
Creates a new endhost API client from the given base URL.
Sourcepub fn new_with_client(base_url: &Url, client: Client) -> Result<Self>
pub fn new_with_client(base_url: &Url, client: Client) -> Result<Self>
Creates a new endhost API client from the given base URL and reqwest::Client.
Sourcepub fn use_token_source(
&mut self,
token_source: Arc<dyn TokenSource>,
) -> &mut Self
pub fn use_token_source( &mut self, token_source: Arc<dyn TokenSource>, ) -> &mut Self
Uses the provided token source for authentication.
Methods from Deref<Target = CrpcClient>§
Sourcepub async fn unary_request<Req, Res>(
&self,
path: &str,
req: Req,
) -> Result<Res, CrpcClientError>
pub async fn unary_request<Req, Res>( &self, path: &str, req: Req, ) -> Result<Res, CrpcClientError>
Unary RPC request.
Trait Implementations§
Source§impl Deref for CrpcEndhostApiClient
impl Deref for CrpcEndhostApiClient
Source§impl EndhostApiClient for CrpcEndhostApiClient
impl EndhostApiClient for CrpcEndhostApiClient
Source§fn list_underlays<'life0, 'async_trait>(
&'life0 self,
isd_as: IsdAsn,
) -> Pin<Box<dyn Future<Output = Result<Underlays, CrpcClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_underlays<'life0, 'async_trait>(
&'life0 self,
isd_as: IsdAsn,
) -> Pin<Box<dyn Future<Output = Result<Underlays, CrpcClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List the available underlays for a given ISD-AS. Read more
Source§fn list_segments<'life0, 'async_trait>(
&'life0 self,
src: IsdAsn,
dst: IsdAsn,
page_size: i32,
page_token: String,
) -> Pin<Box<dyn Future<Output = Result<SegmentsPage, CrpcClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_segments<'life0, 'async_trait>(
&'life0 self,
src: IsdAsn,
dst: IsdAsn,
page_size: i32,
page_token: String,
) -> Pin<Box<dyn Future<Output = Result<SegmentsPage, CrpcClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List the available segments between a source and destination ISD-AS. Read more
Auto Trait Implementations§
impl !Freeze for CrpcEndhostApiClient
impl !RefUnwindSafe for CrpcEndhostApiClient
impl Send for CrpcEndhostApiClient
impl Sync for CrpcEndhostApiClient
impl Unpin for CrpcEndhostApiClient
impl !UnwindSafe for CrpcEndhostApiClient
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> 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> 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