feat(transport): Add channel feature flag (#960)

This commit is contained in:
Lucio Franco
2022-04-04 15:31:40 -04:00
committed by GitHub
parent 738ccba5e7
commit f1ca90f288
3 changed files with 8 additions and 1 deletions
+3
View File
@@ -33,6 +33,9 @@ tls-roots-common = ["tls"]
tls-webpki-roots = ["tls-roots-common", "webpki-roots"] tls-webpki-roots = ["tls-roots-common", "webpki-roots"]
transport = [ transport = [
"axum", "axum",
"channel"
]
channel = [
"h2", "h2",
"hyper", "hyper",
"tokio", "tokio",
+3 -1
View File
@@ -17,7 +17,9 @@
//! # Feature Flags //! # Feature Flags
//! //!
//! - `transport`: Enables the fully featured, batteries included client and server //! - `transport`: Enables the fully featured, batteries included client and server
//! implementation based on [`hyper`], [`tower`] and [`tokio`]. Enabled by default. //! implementation based on [`hyper`], [`tower`] and [`tokio`]. Enabled by default.
//! - `channel`: Enables just the full featured channel/client portion of the `transport`
//! feature.
//! - `codegen`: Enables all the required exports and optional dependencies required //! - `codegen`: Enables all the required exports and optional dependencies required
//! for [`tonic-build`]. Enabled by default. //! for [`tonic-build`]. Enabled by default.
//! - `tls`: Enables the `rustls` based TLS options for the `transport` feature. Not //! - `tls`: Enables the `rustls` based TLS options for the `transport` feature. Not
+2
View File
@@ -94,6 +94,8 @@ mod service;
mod tls; mod tls;
#[doc(inline)] #[doc(inline)]
#[cfg(feature = "channel")]
#[cfg_attr(docsrs, doc(cfg(feature = "channel")))]
pub use self::channel::{Channel, Endpoint}; pub use self::channel::{Channel, Endpoint};
pub use self::error::Error; pub use self::error::Error;
#[doc(inline)] #[doc(inline)]