Export all crates from the tower crate (#210)
This commit is contained in:
parent
b01252c5e9
commit
d968432183
|
@ -13,22 +13,40 @@ clients and servers.
|
||||||
categories = ["asynchronous", "network-programming"]
|
categories = ["asynchronous", "network-programming"]
|
||||||
keywords = ["io", "async", "non-blocking", "futures", "service"]
|
keywords = ["io", "async", "non-blocking", "futures", "service"]
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["layers", "make_service"]
|
||||||
|
layers = [
|
||||||
|
"tower-buffer",
|
||||||
|
"tower-in-flight-limit",
|
||||||
|
"tower-load-shed",
|
||||||
|
"tower-rate-limit",
|
||||||
|
"tower-retry",
|
||||||
|
"tower-filter"
|
||||||
|
]
|
||||||
|
make_service = [
|
||||||
|
"tower-balance",
|
||||||
|
"tower-discover",
|
||||||
|
"tower-reconnect"
|
||||||
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
tower-service = "0.2.0"
|
tower-service = "0.2"
|
||||||
tower-layer = { version = "0.1", path = "../tower-layer" }
|
|
||||||
tower-service-util = { version = "0.1.0", path = "../tower-service-util", features = ["io", "either"] }
|
tower-service-util = { version = "0.1.0", path = "../tower-service-util", features = ["io", "either"] }
|
||||||
|
tower-layer = { version = "0.1", path = "../tower-layer" }
|
||||||
|
tower-in-flight-limit = { version = "0.1", path = "../tower-in-flight-limit", optional = true }
|
||||||
|
tower-rate-limit = { version = "0.1", path = "../tower-rate-limit", optional = true }
|
||||||
|
tower-retry = { version = "0.1", path = "../tower-retry", optional = true }
|
||||||
|
tower-buffer = { version = "0.1", path = "../tower-buffer", optional = true }
|
||||||
|
tower-filter = { version = "0.1", path = "../tower-filter", optional = true }
|
||||||
|
tower-load-shed = { version = "0.1", path = "../tower-load-shed", optional = true }
|
||||||
|
tower-balance = { version = "0.1", path = "../tower-balance", optional = true }
|
||||||
|
tower-discover = { version = "0.1", path = "../tower-discover", optional = true }
|
||||||
|
tower-reconnect = { version = "0.1", path = "../tower-reconnect", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
tower-service = "0.2"
|
|
||||||
tower-in-flight-limit = { version = "0.1", path = "../tower-in-flight-limit" }
|
|
||||||
tower-rate-limit = { version = "0.1", path = "../tower-rate-limit" }
|
|
||||||
tower-reconnect = { version = "0.1", path = "../tower-reconnect" }
|
|
||||||
tower-retry = { version = "0.1", path = "../tower-retry" }
|
|
||||||
tower-buffer = { version = "0.1", path = "../tower-buffer" }
|
|
||||||
tower-hyper = { git = "https://github.com/tower-rs/tower-hyper" }
|
tower-hyper = { git = "https://github.com/tower-rs/tower-hyper" }
|
||||||
tower-layer = { version = "0.1", path = "../tower-layer" }
|
|
||||||
tokio-tcp = "0.1"
|
tokio-tcp = "0.1"
|
||||||
hyper = "0.12"
|
hyper = "0.12"
|
||||||
log = "0.4.1"
|
log = "0.4.1"
|
||||||
|
@ -36,5 +54,4 @@ tokio = "0.1"
|
||||||
env_logger = { version = "0.5.3", default-features = false }
|
env_logger = { version = "0.5.3", default-features = false }
|
||||||
tokio-timer = "0.1"
|
tokio-timer = "0.1"
|
||||||
futures-cpupool = "0.1"
|
futures-cpupool = "0.1"
|
||||||
tokio-mock-task = "0.1"
|
|
||||||
void = "1"
|
void = "1"
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
//! A collection of `Layer` based tower services
|
||||||
|
|
||||||
|
pub use tower_buffer::BufferLayer;
|
||||||
|
pub use tower_filter::FilterLayer;
|
||||||
|
pub use tower_in_flight_limit::InFlightLimitLayer;
|
||||||
|
pub use tower_load_shed::LoadShedLayer;
|
||||||
|
pub use tower_rate_limit::RateLimitLayer;
|
||||||
|
pub use tower_retry::RetryLayer;
|
|
@ -1,14 +1,37 @@
|
||||||
//! Various utility types and functions that are generally with Tower.
|
//! Various utility types and functions that are generally with Tower.
|
||||||
|
|
||||||
pub mod builder;
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate futures;
|
extern crate futures;
|
||||||
#[cfg(test)]
|
|
||||||
extern crate tokio_mock_task;
|
|
||||||
extern crate tower_layer;
|
extern crate tower_layer;
|
||||||
extern crate tower_service;
|
extern crate tower_service;
|
||||||
extern crate tower_service_util;
|
extern crate tower_service_util;
|
||||||
|
|
||||||
|
#[cfg(feature = "layers")]
|
||||||
|
extern crate tower_buffer;
|
||||||
|
#[cfg(feature = "layers")]
|
||||||
|
extern crate tower_filter;
|
||||||
|
#[cfg(feature = "layers")]
|
||||||
|
extern crate tower_in_flight_limit;
|
||||||
|
#[cfg(feature = "layers")]
|
||||||
|
extern crate tower_load_shed;
|
||||||
|
#[cfg(feature = "layers")]
|
||||||
|
extern crate tower_rate_limit;
|
||||||
|
#[cfg(feature = "layers")]
|
||||||
|
extern crate tower_retry;
|
||||||
|
|
||||||
|
#[cfg(feature = "make_service")]
|
||||||
|
extern crate tower_balance;
|
||||||
|
#[cfg(feature = "make_service")]
|
||||||
|
extern crate tower_discover;
|
||||||
|
#[cfg(feature = "make_service")]
|
||||||
|
extern crate tower_reconnect;
|
||||||
|
|
||||||
|
pub mod builder;
|
||||||
|
#[cfg(feature = "layers")]
|
||||||
|
pub mod layer;
|
||||||
|
#[cfg(feature = "make_service")]
|
||||||
|
pub mod make_service;
|
||||||
pub mod util;
|
pub mod util;
|
||||||
|
|
||||||
pub use builder::ServiceBuilder;
|
pub use builder::ServiceBuilder;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
//! A collection of tower `MakeService` based utilities
|
||||||
|
|
||||||
|
pub use tower_balance::{load, Balance, Choose, Load, Pool};
|
||||||
|
pub use tower_discover::Discover;
|
||||||
|
pub use tower_reconnect::Reconnect;
|
|
@ -1,9 +1,5 @@
|
||||||
//! Combinators for working with `Service`s
|
//! Combinators for working with `Service`s
|
||||||
|
|
||||||
use futures::{IntoFuture, Stream};
|
|
||||||
use tower_service::Service;
|
|
||||||
use tower_service_util::CallAll;
|
|
||||||
|
|
||||||
mod and_then;
|
mod and_then;
|
||||||
mod apply;
|
mod apply;
|
||||||
mod from_err;
|
mod from_err;
|
||||||
|
@ -24,9 +20,15 @@ pub use self::then::Then;
|
||||||
|
|
||||||
// `tower-service-util` re-exports
|
// `tower-service-util` re-exports
|
||||||
pub use tower_service_util::BoxService;
|
pub use tower_service_util::BoxService;
|
||||||
|
pub use tower_service_util::CallAll;
|
||||||
|
pub use tower_service_util::CallAllUnordered;
|
||||||
pub use tower_service_util::EitherService;
|
pub use tower_service_util::EitherService;
|
||||||
pub use tower_service_util::OptionService;
|
pub use tower_service_util::OptionService;
|
||||||
pub use tower_service_util::ServiceFn;
|
pub use tower_service_util::ServiceFn;
|
||||||
|
pub use tower_service_util::UnsyncBoxService;
|
||||||
|
|
||||||
|
use futures::{IntoFuture, Stream};
|
||||||
|
use tower_service::Service;
|
||||||
|
|
||||||
impl<T: ?Sized, Request> ServiceExt<Request> for T where T: Service<Request> {}
|
impl<T: ?Sized, Request> ServiceExt<Request> for T where T: Service<Request> {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue