Skip to content

Commit

Permalink
feat(health): Remove unnecessary transport feature (#2130)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Jan 9, 2025
1 parent 85b8f69 commit 171f4dd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions tonic-health/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ readme = "README.md"
repository = "https://github.com/hyperium/tonic"
version = "0.13.0"

[features]
default = ["transport"]
transport = []

[dependencies]
prost = "0.13"
tokio = {version = "1.0", features = ["sync"]}
Expand Down
6 changes: 1 addition & 5 deletions tonic-health/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ use std::fmt;
use std::sync::Arc;
use tokio::sync::{watch, RwLock};
use tokio_stream::Stream;
#[cfg(feature = "transport")]
use tonic::server::NamedService;
use tonic::{Request, Response, Status};
use tonic::{server::NamedService, Request, Response, Status};

/// Creates a `HealthReporter` and a linked `HealthServer` pair. Together,
/// these types can be used to serve the gRPC Health Checking service.
Expand Down Expand Up @@ -50,7 +48,6 @@ impl HealthReporter {

/// Sets the status of the service implemented by `S` to `Serving`. This notifies any watchers
/// if there is a change in status.
#[cfg(feature = "transport")]
pub async fn set_serving<S>(&mut self)
where
S: NamedService,
Expand All @@ -62,7 +59,6 @@ impl HealthReporter {

/// Sets the status of the service implemented by `S` to `NotServing`. This notifies any watchers
/// if there is a change in status.
#[cfg(feature = "transport")]
pub async fn set_not_serving<S>(&mut self)
where
S: NamedService,
Expand Down

0 comments on commit 171f4dd

Please sign in to comment.