pub struct GatewayServiceClient<T> { /* private fields */ }
Expand description
GatewayService is the service providing API methods for managing gateways.
Implementations§
source§impl<T> GatewayServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> GatewayServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> GatewayServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub async fn create(
&mut self,
request: impl IntoRequest<CreateGatewayRequest>
) -> Result<Response<()>, Status>
pub async fn create(
&mut self,
request: impl IntoRequest<CreateGatewayRequest>
) -> Result<Response<()>, Status>
Create creates the given gateway.
sourcepub async fn get(
&mut self,
request: impl IntoRequest<GetGatewayRequest>
) -> Result<Response<GetGatewayResponse>, Status>
pub async fn get(
&mut self,
request: impl IntoRequest<GetGatewayRequest>
) -> Result<Response<GetGatewayResponse>, Status>
Get returns the gateway for the given Gateway ID.
sourcepub async fn update(
&mut self,
request: impl IntoRequest<UpdateGatewayRequest>
) -> Result<Response<()>, Status>
pub async fn update(
&mut self,
request: impl IntoRequest<UpdateGatewayRequest>
) -> Result<Response<()>, Status>
Update updates the given gateway.
sourcepub async fn delete(
&mut self,
request: impl IntoRequest<DeleteGatewayRequest>
) -> Result<Response<()>, Status>
pub async fn delete(
&mut self,
request: impl IntoRequest<DeleteGatewayRequest>
) -> Result<Response<()>, Status>
Delete deletes the gateway matching the given Gateway ID.
sourcepub async fn list(
&mut self,
request: impl IntoRequest<ListGatewaysRequest>
) -> Result<Response<ListGatewaysResponse>, Status>
pub async fn list(
&mut self,
request: impl IntoRequest<ListGatewaysRequest>
) -> Result<Response<ListGatewaysResponse>, Status>
Get the list of gateways.
sourcepub async fn generate_client_certificate(
&mut self,
request: impl IntoRequest<GenerateGatewayClientCertificateRequest>
) -> Result<Response<GenerateGatewayClientCertificateResponse>, Status>
pub async fn generate_client_certificate(
&mut self,
request: impl IntoRequest<GenerateGatewayClientCertificateRequest>
) -> Result<Response<GenerateGatewayClientCertificateResponse>, Status>
Generate client-certificate for the gateway.
sourcepub async fn get_metrics(
&mut self,
request: impl IntoRequest<GetGatewayMetricsRequest>
) -> Result<Response<GetGatewayMetricsResponse>, Status>
pub async fn get_metrics(
&mut self,
request: impl IntoRequest<GetGatewayMetricsRequest>
) -> Result<Response<GetGatewayMetricsResponse>, Status>
GetMetrics returns the gateway metrics.
Trait Implementations§
source§impl<T: Clone> Clone for GatewayServiceClient<T>
impl<T: Clone> Clone for GatewayServiceClient<T>
source§fn clone(&self) -> GatewayServiceClient<T>
fn clone(&self) -> GatewayServiceClient<T>
Returns a copy 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 moreAuto Trait Implementations§
impl<T> RefUnwindSafe for GatewayServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for GatewayServiceClient<T>where
T: Send,
impl<T> Sync for GatewayServiceClient<T>where
T: Sync,
impl<T> Unpin for GatewayServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for GatewayServiceClient<T>where
T: UnwindSafe,
Blanket Implementations§
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