feat(build): Add build_transport builder option (#1130)
This commit is contained in:
@@ -1,16 +1,26 @@
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct HealthCheckRequest {
|
||||
#[prost(string, tag="1")]
|
||||
#[prost(string, tag = "1")]
|
||||
pub service: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct HealthCheckResponse {
|
||||
#[prost(enumeration="health_check_response::ServingStatus", tag="1")]
|
||||
#[prost(enumeration = "health_check_response::ServingStatus", tag = "1")]
|
||||
pub status: i32,
|
||||
}
|
||||
/// Nested message and enum types in `HealthCheckResponse`.
|
||||
pub mod health_check_response {
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
PartialEq,
|
||||
Eq,
|
||||
Hash,
|
||||
PartialOrd,
|
||||
Ord,
|
||||
::prost::Enumeration
|
||||
)]
|
||||
#[repr(i32)]
|
||||
pub enum ServingStatus {
|
||||
Unknown = 0,
|
||||
@@ -103,8 +113,8 @@ pub mod health_client {
|
||||
self.inner = self.inner.accept_compressed(encoding);
|
||||
self
|
||||
}
|
||||
///If the requested service is unknown, the call will fail with status
|
||||
///NOT_FOUND.
|
||||
/// If the requested service is unknown, the call will fail with status
|
||||
/// NOT_FOUND.
|
||||
pub async fn check(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::HealthCheckRequest>,
|
||||
@@ -124,21 +134,21 @@ pub mod health_client {
|
||||
);
|
||||
self.inner.unary(request.into_request(), path, codec).await
|
||||
}
|
||||
///Performs a watch for the serving status of the requested service.
|
||||
///The server will immediately send back a message indicating the current
|
||||
///serving status. It will then subsequently send a new message whenever
|
||||
///the service's serving status changes.
|
||||
/// Performs a watch for the serving status of the requested service.
|
||||
/// The server will immediately send back a message indicating the current
|
||||
/// serving status. It will then subsequently send a new message whenever
|
||||
/// the service's serving status changes.
|
||||
///
|
||||
///If the requested service is unknown when the call is received, the
|
||||
///server will send a message setting the serving status to
|
||||
///SERVICE_UNKNOWN but will *not* terminate the call. If at some
|
||||
///future point, the serving status of the service becomes known, the
|
||||
///server will send a new message with the service's serving status.
|
||||
/// If the requested service is unknown when the call is received, the
|
||||
/// server will send a message setting the serving status to
|
||||
/// SERVICE_UNKNOWN but will *not* terminate the call. If at some
|
||||
/// future point, the serving status of the service becomes known, the
|
||||
/// server will send a new message with the service's serving status.
|
||||
///
|
||||
///If the call terminates with status UNIMPLEMENTED, then clients
|
||||
///should assume this method is not supported and should not retry the
|
||||
///call. If the call terminates with any other status (including OK),
|
||||
///clients should retry the call with appropriate exponential backoff.
|
||||
/// If the call terminates with status UNIMPLEMENTED, then clients
|
||||
/// should assume this method is not supported and should not retry the
|
||||
/// call. If the call terminates with any other status (including OK),
|
||||
/// clients should retry the call with appropriate exponential backoff.
|
||||
pub async fn watch(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::HealthCheckRequest>,
|
||||
@@ -167,36 +177,36 @@ pub mod health_client {
|
||||
pub mod health_server {
|
||||
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||
use tonic::codegen::*;
|
||||
///Generated trait containing gRPC methods that should be implemented for use with HealthServer.
|
||||
/// Generated trait containing gRPC methods that should be implemented for use with HealthServer.
|
||||
#[async_trait]
|
||||
pub trait Health: Send + Sync + 'static {
|
||||
///If the requested service is unknown, the call will fail with status
|
||||
///NOT_FOUND.
|
||||
/// If the requested service is unknown, the call will fail with status
|
||||
/// NOT_FOUND.
|
||||
async fn check(
|
||||
&self,
|
||||
request: tonic::Request<super::HealthCheckRequest>,
|
||||
) -> Result<tonic::Response<super::HealthCheckResponse>, tonic::Status>;
|
||||
///Server streaming response type for the Watch method.
|
||||
/// Server streaming response type for the Watch method.
|
||||
type WatchStream: futures_core::Stream<
|
||||
Item = Result<super::HealthCheckResponse, tonic::Status>,
|
||||
>
|
||||
+ Send
|
||||
+ 'static;
|
||||
///Performs a watch for the serving status of the requested service.
|
||||
///The server will immediately send back a message indicating the current
|
||||
///serving status. It will then subsequently send a new message whenever
|
||||
///the service's serving status changes.
|
||||
/// Performs a watch for the serving status of the requested service.
|
||||
/// The server will immediately send back a message indicating the current
|
||||
/// serving status. It will then subsequently send a new message whenever
|
||||
/// the service's serving status changes.
|
||||
///
|
||||
///If the requested service is unknown when the call is received, the
|
||||
///server will send a message setting the serving status to
|
||||
///SERVICE_UNKNOWN but will *not* terminate the call. If at some
|
||||
///future point, the serving status of the service becomes known, the
|
||||
///server will send a new message with the service's serving status.
|
||||
/// If the requested service is unknown when the call is received, the
|
||||
/// server will send a message setting the serving status to
|
||||
/// SERVICE_UNKNOWN but will *not* terminate the call. If at some
|
||||
/// future point, the serving status of the service becomes known, the
|
||||
/// server will send a new message with the service's serving status.
|
||||
///
|
||||
///If the call terminates with status UNIMPLEMENTED, then clients
|
||||
///should assume this method is not supported and should not retry the
|
||||
///call. If the call terminates with any other status (including OK),
|
||||
///clients should retry the call with appropriate exponential backoff.
|
||||
/// If the call terminates with status UNIMPLEMENTED, then clients
|
||||
/// should assume this method is not supported and should not retry the
|
||||
/// call. If the call terminates with any other status (including OK),
|
||||
/// clients should retry the call with appropriate exponential backoff.
|
||||
async fn watch(
|
||||
&self,
|
||||
request: tonic::Request<super::HealthCheckRequest>,
|
||||
|
||||
Reference in New Issue
Block a user