Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of unused transport feature. #1112

Merged
merged 9 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tonic-health/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ bytes = "1.0"
prost = "0.11"
tokio = {version = "1.0", features = ["sync"]}
tokio-stream = "0.1"
tonic = {version = "0.8", path = "../tonic", features = ["codegen", "prost"]}
tonic = { version = "0.8", path = "../tonic", default-features = false, features = ["codegen", "prost"] }

[dev-dependencies]
tokio = {version = "1.0", features = ["rt-multi-thread", "macros"]}
tonic-build = {version = "0.8", path = "../tonic-build", features = ["prost"]}
tonic-build = { version = "0.8", path = "../tonic-build", default-features = false, features = ["prost"] }
71 changes: 30 additions & 41 deletions tonic-health/src/generated/grpc.health.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ pub mod health_client {
pub struct HealthClient<T> {
inner: tonic::client::Grpc<T>,
}
impl HealthClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> HealthClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
Expand Down Expand Up @@ -103,8 +92,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>,
Expand All @@ -124,21 +113,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>,
Expand Down Expand Up @@ -170,8 +159,8 @@ pub mod health_server {
///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>,
Expand All @@ -182,21 +171,21 @@ pub mod health_server {
>
+ 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>,
Expand Down
5 changes: 3 additions & 2 deletions tonic-reflection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ prost = "0.11"
prost-types = "0.11"
tokio = {version = "1.0", features = ["sync"]}
tokio-stream = {version = "0.1", features = ["net"]}
tonic = {version = "0.8", path = "../tonic", features = ["codegen", "prost"]}
tonic = { version = "0.8", path = "../tonic", default-features = false, features = ["codegen", "prost"] }

[build-dependencies]
tonic-build = {version = "0.8", path = "../tonic-build", features = ["transport", "prost"]}
tonic-build = { version = "0.8", path = "../tonic-build", default-features = false, features = ["prost"] }

[dev-dependencies]
tonic = { version = "0.8", path = "../tonic", default-features = false, features = ["transport"] }
futures = "0.3"
futures-util = "0.3"