pub struct CrpcSnapControlClient { /* private fields */ }Expand description
Connect RPC client for the SNAP control plane API.
Implementations§
Source§impl CrpcSnapControlClient
impl CrpcSnapControlClient
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 client with the provided 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 ControlPlaneApi for CrpcSnapControlClient
impl ControlPlaneApi for CrpcSnapControlClient
Source§fn create_data_plane_sessions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionGrant>, CrpcClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_data_plane_sessions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionGrant>, CrpcClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates SNAP data plane sessions for all data planes.
Source§fn renew_data_plane_session<'life0, 'async_trait>(
&'life0 self,
address: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<SessionGrant, CrpcClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn renew_data_plane_session<'life0, 'async_trait>(
&'life0 self,
address: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<SessionGrant, CrpcClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Renews a SNAP data plane session for the given address.
Auto Trait Implementations§
impl !Freeze for CrpcSnapControlClient
impl !RefUnwindSafe for CrpcSnapControlClient
impl Send for CrpcSnapControlClient
impl Sync for CrpcSnapControlClient
impl Unpin for CrpcSnapControlClient
impl !UnwindSafe for CrpcSnapControlClient
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