From 8df2a3e4101d9f14c9e9ff46ad6aca292ee2f51f Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Tue, 31 Mar 2020 13:10:47 -0400 Subject: [PATCH] step 1: move all things to where they're going Note that this also moves all crates from `log` to `tracing`. It also does not set any dependencies as optional. --- Cargo.toml | 15 ----- tower-balance/CHANGELOG.md | 18 ------ tower-balance/Cargo.toml | 53 ----------------- tower-balance/LICENSE | 25 -------- tower-balance/README.md | 13 ---- tower-balance/src/lib.rs | 14 ----- tower-buffer/CHANGELOG.md | 31 ---------- tower-buffer/Cargo.toml | 39 ------------ tower-buffer/LICENSE | 25 -------- tower-buffer/README.md | 13 ---- tower-discover/CHANGELOG.md | 17 ------ tower-discover/Cargo.toml | 27 --------- tower-discover/LICENSE | 25 -------- tower-discover/README.md | 13 ---- tower-filter/CHANGELOG.md | 12 ---- tower-filter/Cargo.toml | 35 ----------- tower-filter/LICENSE | 25 -------- tower-filter/README.md | 14 ----- tower-hedge/CHANGELOG.md | 3 - tower-hedge/Cargo.toml | 20 ------- tower-hedge/README.md | 0 tower-limit/CHANGELOG.md | 22 ------- tower-limit/Cargo.toml | 35 ----------- tower-limit/LICENSE | 25 -------- tower-limit/README.md | 13 ---- tower-limit/src/lib.rs | 18 ------ tower-load-shed/CHANGELOG.md | 17 ------ tower-load-shed/Cargo.toml | 34 ----------- tower-load-shed/LICENSE | 25 -------- tower-load-shed/README.md | 14 ----- tower-load/CHANGELOG.md | 17 ------ tower-load/Cargo.toml | 35 ----------- tower-load/LICENSE | 25 -------- tower-load/README.md | 13 ---- tower-make/CHANGELOG.md | 26 -------- tower-make/Cargo.toml | 21 ------- tower-make/LICENSE | 25 -------- tower-make/README.md | 13 ---- tower-make/src/lib.rs | 21 ------- tower-ready-cache/CHANGELOG.md | 5 -- tower-ready-cache/Cargo.toml | 35 ----------- tower-ready-cache/README.md | 14 ----- tower-ready-cache/src/lib.rs | 11 ---- tower-reconnect/CHANGELOG.md | 16 ----- tower-reconnect/Cargo.toml | 28 --------- tower-reconnect/LICENSE | 25 -------- tower-reconnect/README.md | 13 ---- tower-retry/CHANGELOG.md | 19 ------ tower-retry/Cargo.toml | 35 ----------- tower-retry/LICENSE | 25 -------- tower-retry/README.md | 13 ---- tower-spawn-ready/CHANGELOG.md | 16 ----- tower-spawn-ready/Cargo.toml | 35 ----------- tower-spawn-ready/LICENSE | 25 -------- tower-spawn-ready/README.md | 13 ---- tower-spawn-ready/src/lib.rs | 23 -------- tower-timeout/CHANGELOG.md | 20 ------- tower-timeout/Cargo.toml | 28 --------- tower-timeout/LICENSE | 25 -------- tower-timeout/README.md | 13 ---- tower-util/CHANGELOG.md | 28 --------- tower-util/Cargo.toml | 41 ------------- tower-util/LICENSE | 25 -------- tower-util/README.md | 13 ---- tower/CHANGELOG.md | 16 +++++ tower/Cargo.toml | 56 ++++++++++++------ .../src => tower/src/balance}/error.rs | 0 tower/src/balance/mod.rs | 5 ++ .../src => tower/src/balance}/p2c/layer.rs | 0 .../src => tower/src/balance}/p2c/make.rs | 4 +- .../src => tower/src/balance}/p2c/mod.rs | 0 .../src => tower/src/balance}/p2c/service.rs | 8 +-- .../src => tower/src/balance}/p2c/test.rs | 0 .../src => tower/src/balance}/pool/mod.rs | 8 +-- .../src => tower/src/balance}/pool/test.rs | 0 .../src => tower/src/buffer}/error.rs | 0 .../src => tower/src/buffer}/future.rs | 2 +- .../src => tower/src/buffer}/layer.rs | 2 +- .../src => tower/src/buffer}/message.rs | 2 +- .../src/lib.rs => tower/src/buffer/mod.rs | 13 +--- .../src => tower/src/buffer}/service.rs | 2 +- .../src => tower/src/buffer}/worker.rs | 2 +- tower/src/builder/mod.rs | 53 ++++++++++------- .../src => tower/src/discover}/error.rs | 0 .../src => tower/src/discover}/list.rs | 2 +- .../src/lib.rs => tower/src/discover/mod.rs | 11 +--- .../src => tower/src/discover}/stream.rs | 2 +- .../src => tower/src/filter}/error.rs | 0 .../src => tower/src/filter}/future.rs | 2 +- .../src => tower/src/filter}/layer.rs | 2 +- .../src/lib.rs => tower/src/filter/mod.rs | 13 +--- .../src => tower/src/filter}/predicate.rs | 2 +- {tower-hedge/src => tower/src/hedge}/delay.rs | 0 .../src => tower/src/hedge}/latency.rs | 0 .../src/lib.rs => tower/src/hedge/mod.rs | 10 ++-- .../src/hedge}/rotating_histogram.rs | 2 +- .../src => tower/src/hedge}/select.rs | 0 tower/src/lib.rs | 59 ++++++++++++------- .../src/limit}/concurrency/future.rs | 0 .../src/limit}/concurrency/layer.rs | 0 .../src/limit}/concurrency/mod.rs | 0 .../src/limit}/concurrency/never.rs | 0 .../src/limit}/concurrency/service.rs | 5 +- .../src/limit}/concurrency/sync/cell.rs | 0 .../src/limit}/concurrency/sync/mod.rs | 0 .../src/limit}/concurrency/sync/semaphore.rs | 0 .../src/limit}/concurrency/sync/waker.rs | 0 tower/src/limit/mod.rs | 9 +++ .../src => tower/src/limit}/rate/layer.rs | 0 .../src => tower/src/limit}/rate/mod.rs | 0 .../src => tower/src/limit}/rate/rate.rs | 0 .../src => tower/src/limit}/rate/service.rs | 5 +- .../src => tower/src/load}/constant.rs | 4 +- .../src => tower/src/load}/instrument.rs | 0 .../src/lib.rs => tower/src/load/mod.rs | 9 --- .../src => tower/src/load}/peak_ewma.rs | 6 +- .../src/load}/pending_requests.rs | 4 +- .../src => tower/src/load_shed}/error.rs | 0 .../src => tower/src/load_shed}/future.rs | 2 +- .../src => tower/src/load_shed}/layer.rs | 2 +- .../src/lib.rs => tower/src/load_shed/mod.rs | 15 +---- .../src => tower/src/make}/make_connection.rs | 2 +- .../src => tower/src/make}/make_service.rs | 2 +- tower/src/make/mod.rs | 11 ++++ .../src => tower/src/ready_cache}/cache.rs | 4 +- .../src => tower/src/ready_cache}/error.rs | 0 tower/src/ready_cache/mod.rs | 6 ++ .../src => tower/src/reconnect}/future.rs | 2 +- .../src/lib.rs => tower/src/reconnect/mod.rs | 11 +--- .../src => tower/src/retry}/budget.rs | 0 .../src => tower/src/retry}/future.rs | 2 +- {tower-retry/src => tower/src/retry}/layer.rs | 2 +- .../src/lib.rs => tower/src/retry/mod.rs | 15 +---- {tower-retry/src => tower/src/retry}/never.rs | 0 .../src => tower/src/retry}/policy.rs | 0 .../src => tower/src/spawn_ready}/future.rs | 2 +- .../src => tower/src/spawn_ready}/layer.rs | 2 +- .../src => tower/src/spawn_ready}/make.rs | 2 +- tower/src/spawn_ready/mod.rs | 14 +++++ .../src => tower/src/spawn_ready}/service.rs | 2 +- .../src => tower/src/timeout}/error.rs | 0 .../src => tower/src/timeout}/future.rs | 2 +- .../src => tower/src/timeout}/layer.rs | 2 +- .../src/lib.rs => tower/src/timeout/mod.rs | 12 +--- .../src => tower/src/timeout}/never.rs | 0 tower/src/util.rs | 6 -- .../src => tower/src/util}/boxed/mod.rs | 0 .../src => tower/src/util}/boxed/sync.rs | 0 .../src => tower/src/util}/boxed/unsync.rs | 0 .../src => tower/src/util}/call_all/common.rs | 0 .../src => tower/src/util}/call_all/mod.rs | 0 .../src/util}/call_all/ordered.rs | 0 .../src/util}/call_all/unordered.rs | 0 {tower-util/src => tower/src/util}/either.rs | 0 .../src/lib.rs => tower/src/util/mod.rs | 19 ++---- {tower-util/src => tower/src/util}/oneshot.rs | 0 .../src => tower/src/util}/optional/error.rs | 0 .../src => tower/src/util}/optional/future.rs | 0 .../src => tower/src/util}/optional/mod.rs | 0 {tower-util/src => tower/src/util}/ready.rs | 0 .../src => tower/src/util}/service_fn.rs | 0 .../p2c.rs => tower/tests/balance/main.rs | 0 .../buffer.rs => tower/tests/buffer/main.rs | 0 .../filter.rs => tower/tests/filter/main.rs | 0 .../hedge.rs => tower/tests/hedge/main.rs | 0 .../tests/limit}/concurrency.rs | 0 tower/tests/limit/main.rs | 2 + .../tests => tower/tests/limit}/rate.rs | 0 .../tests/load_shed/main.rs | 0 .../tests/ready_cache/main.rs | 0 .../retry.rs => tower/tests/retry/main.rs | 0 .../tests/spawn_ready/main.rs | 0 .../tests => tower/tests/util}/call_all.rs | 0 tower/tests/util/main.rs | 2 + .../tests => tower/tests/util}/service_fn.rs | 0 175 files changed, 245 insertions(+), 1598 deletions(-) delete mode 100644 tower-balance/CHANGELOG.md delete mode 100644 tower-balance/Cargo.toml delete mode 100644 tower-balance/LICENSE delete mode 100644 tower-balance/README.md delete mode 100644 tower-balance/src/lib.rs delete mode 100644 tower-buffer/CHANGELOG.md delete mode 100644 tower-buffer/Cargo.toml delete mode 100644 tower-buffer/LICENSE delete mode 100644 tower-buffer/README.md delete mode 100644 tower-discover/CHANGELOG.md delete mode 100644 tower-discover/Cargo.toml delete mode 100644 tower-discover/LICENSE delete mode 100644 tower-discover/README.md delete mode 100644 tower-filter/CHANGELOG.md delete mode 100644 tower-filter/Cargo.toml delete mode 100644 tower-filter/LICENSE delete mode 100644 tower-filter/README.md delete mode 100644 tower-hedge/CHANGELOG.md delete mode 100644 tower-hedge/Cargo.toml delete mode 100644 tower-hedge/README.md delete mode 100644 tower-limit/CHANGELOG.md delete mode 100644 tower-limit/Cargo.toml delete mode 100644 tower-limit/LICENSE delete mode 100644 tower-limit/README.md delete mode 100644 tower-limit/src/lib.rs delete mode 100644 tower-load-shed/CHANGELOG.md delete mode 100644 tower-load-shed/Cargo.toml delete mode 100644 tower-load-shed/LICENSE delete mode 100644 tower-load-shed/README.md delete mode 100644 tower-load/CHANGELOG.md delete mode 100644 tower-load/Cargo.toml delete mode 100644 tower-load/LICENSE delete mode 100644 tower-load/README.md delete mode 100644 tower-make/CHANGELOG.md delete mode 100644 tower-make/Cargo.toml delete mode 100644 tower-make/LICENSE delete mode 100644 tower-make/README.md delete mode 100644 tower-make/src/lib.rs delete mode 100644 tower-ready-cache/CHANGELOG.md delete mode 100644 tower-ready-cache/Cargo.toml delete mode 100644 tower-ready-cache/README.md delete mode 100644 tower-ready-cache/src/lib.rs delete mode 100644 tower-reconnect/CHANGELOG.md delete mode 100644 tower-reconnect/Cargo.toml delete mode 100644 tower-reconnect/LICENSE delete mode 100644 tower-reconnect/README.md delete mode 100644 tower-retry/CHANGELOG.md delete mode 100644 tower-retry/Cargo.toml delete mode 100644 tower-retry/LICENSE delete mode 100644 tower-retry/README.md delete mode 100644 tower-spawn-ready/CHANGELOG.md delete mode 100644 tower-spawn-ready/Cargo.toml delete mode 100644 tower-spawn-ready/LICENSE delete mode 100644 tower-spawn-ready/README.md delete mode 100644 tower-spawn-ready/src/lib.rs delete mode 100644 tower-timeout/CHANGELOG.md delete mode 100644 tower-timeout/Cargo.toml delete mode 100644 tower-timeout/LICENSE delete mode 100644 tower-timeout/README.md delete mode 100644 tower-util/CHANGELOG.md delete mode 100644 tower-util/Cargo.toml delete mode 100644 tower-util/LICENSE delete mode 100644 tower-util/README.md rename {tower-balance/src => tower/src/balance}/error.rs (100%) create mode 100644 tower/src/balance/mod.rs rename {tower-balance/src => tower/src/balance}/p2c/layer.rs (100%) rename {tower-balance/src => tower/src/balance}/p2c/make.rs (97%) rename {tower-balance/src => tower/src/balance}/p2c/mod.rs (100%) rename {tower-balance/src => tower/src/balance}/p2c/service.rs (98%) rename {tower-balance/src => tower/src/balance}/p2c/test.rs (100%) rename {tower-balance/src => tower/src/balance}/pool/mod.rs (99%) rename {tower-balance/src => tower/src/balance}/pool/test.rs (100%) rename {tower-buffer/src => tower/src/buffer}/error.rs (100%) rename {tower-buffer/src => tower/src/buffer}/future.rs (99%) rename {tower-buffer/src => tower/src/buffer}/layer.rs (95%) rename {tower-buffer/src => tower/src/buffer}/message.rs (92%) rename tower-buffer/src/lib.rs => tower/src/buffer/mod.rs (61%) rename {tower-buffer/src => tower/src/buffer}/service.rs (99%) rename {tower-buffer/src => tower/src/buffer}/worker.rs (99%) rename {tower-discover/src => tower/src/discover}/error.rs (100%) rename {tower-discover/src => tower/src/discover}/list.rs (97%) rename tower-discover/src/lib.rs => tower/src/discover/mod.rs (90%) rename {tower-discover/src => tower/src/discover}/stream.rs (97%) rename {tower-filter/src => tower/src/filter}/error.rs (100%) rename {tower-filter/src => tower/src/filter}/future.rs (98%) rename {tower-filter/src => tower/src/filter}/layer.rs (96%) rename tower-filter/src/lib.rs => tower/src/filter/mod.rs (80%) rename {tower-filter/src => tower/src/filter}/predicate.rs (96%) rename {tower-hedge/src => tower/src/hedge}/delay.rs (100%) rename {tower-hedge/src => tower/src/hedge}/latency.rs (100%) rename tower-hedge/src/lib.rs => tower/src/hedge/mod.rs (96%) rename {tower-hedge/src => tower/src/hedge}/rotating_histogram.rs (99%) rename {tower-hedge/src => tower/src/hedge}/select.rs (100%) rename {tower-limit/src => tower/src/limit}/concurrency/future.rs (100%) rename {tower-limit/src => tower/src/limit}/concurrency/layer.rs (100%) rename {tower-limit/src => tower/src/limit}/concurrency/mod.rs (100%) rename {tower-limit/src => tower/src/limit}/concurrency/never.rs (100%) rename {tower-limit/src => tower/src/limit}/concurrency/service.rs (96%) rename {tower-limit/src => tower/src/limit}/concurrency/sync/cell.rs (100%) rename {tower-limit/src => tower/src/limit}/concurrency/sync/mod.rs (100%) rename {tower-limit/src => tower/src/limit}/concurrency/sync/semaphore.rs (100%) rename {tower-limit/src => tower/src/limit}/concurrency/sync/waker.rs (100%) create mode 100644 tower/src/limit/mod.rs rename {tower-limit/src => tower/src/limit}/rate/layer.rs (100%) rename {tower-limit/src => tower/src/limit}/rate/mod.rs (100%) rename {tower-limit/src => tower/src/limit}/rate/rate.rs (100%) rename {tower-limit/src => tower/src/limit}/rate/service.rs (96%) rename {tower-load/src => tower/src/load}/constant.rs (96%) rename {tower-load/src => tower/src/load}/instrument.rs (100%) rename tower-load/src/lib.rs => tower/src/load/mod.rs (74%) rename {tower-load/src => tower/src/load}/peak_ewma.rs (99%) rename {tower-load/src => tower/src/load}/pending_requests.rs (98%) rename {tower-load-shed/src => tower/src/load_shed}/error.rs (100%) rename {tower-load-shed/src => tower/src/load_shed}/future.rs (97%) rename {tower-load-shed/src => tower/src/load_shed}/layer.rs (96%) rename tower-load-shed/src/lib.rs => tower/src/load_shed/mod.rs (86%) rename {tower-make/src => tower/src/make}/make_connection.rs (98%) rename {tower-make/src => tower/src/make}/make_service.rs (98%) create mode 100644 tower/src/make/mod.rs rename {tower-ready-cache/src => tower/src/ready_cache}/cache.rs (99%) rename {tower-ready-cache/src => tower/src/ready_cache}/error.rs (100%) create mode 100644 tower/src/ready_cache/mod.rs rename {tower-reconnect/src => tower/src/reconnect}/future.rs (97%) rename tower-reconnect/src/lib.rs => tower/src/reconnect/mod.rs (94%) rename {tower-retry/src => tower/src/retry}/budget.rs (100%) rename {tower-retry/src => tower/src/retry}/future.rs (99%) rename {tower-retry/src => tower/src/retry}/layer.rs (96%) rename tower-retry/src/lib.rs => tower/src/retry/mod.rs (82%) rename {tower-retry/src => tower/src/retry}/never.rs (100%) rename {tower-retry/src => tower/src/retry}/policy.rs (100%) rename {tower-spawn-ready/src => tower/src/spawn_ready}/future.rs (98%) rename {tower-spawn-ready/src => tower/src/spawn_ready}/layer.rs (94%) rename {tower-spawn-ready/src => tower/src/spawn_ready}/make.rs (98%) create mode 100644 tower/src/spawn_ready/mod.rs rename {tower-spawn-ready/src => tower/src/spawn_ready}/service.rs (97%) rename {tower-timeout/src => tower/src/timeout}/error.rs (100%) rename {tower-timeout/src => tower/src/timeout}/future.rs (96%) rename {tower-timeout/src => tower/src/timeout}/layer.rs (96%) rename tower-timeout/src/lib.rs => tower/src/timeout/mod.rs (83%) rename {tower-timeout/src => tower/src/timeout}/never.rs (100%) delete mode 100644 tower/src/util.rs rename {tower-util/src => tower/src/util}/boxed/mod.rs (100%) rename {tower-util/src => tower/src/util}/boxed/sync.rs (100%) rename {tower-util/src => tower/src/util}/boxed/unsync.rs (100%) rename {tower-util/src => tower/src/util}/call_all/common.rs (100%) rename {tower-util/src => tower/src/util}/call_all/mod.rs (100%) rename {tower-util/src => tower/src/util}/call_all/ordered.rs (100%) rename {tower-util/src => tower/src/util}/call_all/unordered.rs (100%) rename {tower-util/src => tower/src/util}/either.rs (100%) rename tower-util/src/lib.rs => tower/src/util/mod.rs (83%) rename {tower-util/src => tower/src/util}/oneshot.rs (100%) rename {tower-util/src => tower/src/util}/optional/error.rs (100%) rename {tower-util/src => tower/src/util}/optional/future.rs (100%) rename {tower-util/src => tower/src/util}/optional/mod.rs (100%) rename {tower-util/src => tower/src/util}/ready.rs (100%) rename {tower-util/src => tower/src/util}/service_fn.rs (100%) rename tower-balance/tests/p2c.rs => tower/tests/balance/main.rs (100%) rename tower-buffer/tests/buffer.rs => tower/tests/buffer/main.rs (100%) rename tower-filter/tests/filter.rs => tower/tests/filter/main.rs (100%) rename tower-hedge/tests/hedge.rs => tower/tests/hedge/main.rs (100%) rename {tower-limit/tests => tower/tests/limit}/concurrency.rs (100%) create mode 100644 tower/tests/limit/main.rs rename {tower-limit/tests => tower/tests/limit}/rate.rs (100%) rename tower-load-shed/tests/load-shed.rs => tower/tests/load_shed/main.rs (100%) rename tower-ready-cache/tests/ready_cache.rs => tower/tests/ready_cache/main.rs (100%) rename tower-retry/tests/retry.rs => tower/tests/retry/main.rs (100%) rename tower-spawn-ready/tests/spawn_ready.rs => tower/tests/spawn_ready/main.rs (100%) rename {tower-util/tests => tower/tests/util}/call_all.rs (100%) create mode 100644 tower/tests/util/main.rs rename {tower-util/tests => tower/tests/util}/service_fn.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 6a82d11..b7d4757 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,22 +2,7 @@ members = [ "tower", - "tower-balance", - "tower-buffer", - "tower-discover", - "tower-filter", - "tower-hedge", "tower-layer", - "tower-limit", - "tower-load", - "tower-load-shed", - "tower-ready-cache", - "tower-reconnect", - "tower-retry", "tower-service", - "tower-spawn-ready", "tower-test", - "tower-timeout", - "tower-make", - "tower-util", ] diff --git a/tower-balance/CHANGELOG.md b/tower-balance/CHANGELOG.md deleted file mode 100644 index 1aa198f..0000000 --- a/tower-balance/CHANGELOG.md +++ /dev/null @@ -1,18 +0,0 @@ -# 0.3.0 (December 4, 2019) - -- Update to `tower-service 0.3` -- Update to `tower-ready-cache 0.3` -- Update to `futures 0.3` - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.0 (unreleased) - -- Initial release diff --git a/tower-balance/Cargo.toml b/tower-balance/Cargo.toml deleted file mode 100644 index ea41c9f..0000000 --- a/tower-balance/Cargo.toml +++ /dev/null @@ -1,53 +0,0 @@ -[package] -name = "tower-balance" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-balance/0.3.0" -description = """ -Balance load across a set of uniform services. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[features] -log = ["tracing/log"] -default = ["log"] - -[dependencies] -futures-util = { version = "0.3", default-features = false } -futures-core = { version = "0.3", default-features = false } -pin-project = "0.4" -indexmap = "1.0.2" -tracing = "0.1" -rand = { version = "0.7", features = ["small_rng"] } -tokio = { version = "0.2", features = ["sync", "time"] } -tower-discover = { version = "0.3", path = "../tower-discover" } -tower-layer = "0.3" -tower-load = { version = "0.3", path = "../tower-load" } -tower-service = "0.3" -tower-ready-cache = { version = "0.3", path = "../tower-ready-cache" } -tower-make = "0.3" -slab = "0.4" - -[dev-dependencies] -tracing-subscriber = "0.1.1" -hdrhistogram = "6.0" -quickcheck = { version = "0.6", default-features = false } -tokio = { version = "0.2", features = ["macros", "stream"] } -tokio-test = "0.2" -tower-buffer = { version = "0.3", path = "../tower-buffer" } -tower-limit = { version = "0.3", path = "../tower-limit" } -tower-test = { version = "0.3", path = "../tower-test" } -tower = { version = "0.3", path = "../tower" } diff --git a/tower-balance/LICENSE b/tower-balance/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-balance/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-balance/README.md b/tower-balance/README.md deleted file mode 100644 index 1ceb355..0000000 --- a/tower-balance/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Balance - -Balance load across a set of uniform services. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-balance/src/lib.rs b/tower-balance/src/lib.rs deleted file mode 100644 index 2c0006f..0000000 --- a/tower-balance/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -//! Load balancing middlewares. - -#![doc(html_root_url = "https://docs.rs/tower-balance/0.3.0")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] -#![allow(elided_lifetimes_in_paths)] - -pub mod error; -pub mod p2c; -pub mod pool; diff --git a/tower-buffer/CHANGELOG.md b/tower-buffer/CHANGELOG.md deleted file mode 100644 index 3876abc..0000000 --- a/tower-buffer/CHANGELOG.md +++ /dev/null @@ -1,31 +0,0 @@ -# 0.3.0 (December 19, 2019) - -- Update to `tokio 0.2` -- Update to `futures-core 0.3` -- Update to `tower-service 0.3` -- Update to `tower-layer 0.3` - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1b (September 13, 2019) - -- Remove `Stream` unused warning. - -# 0.3.0-alpha.1a (September 13, 2019) - -- Fix `poll_next` not exisitng. - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.1 (July 19, 2019) - -- Add `tracing` support - -# 0.1.0 (April 26, 2019) - -- Initial release diff --git a/tower-buffer/Cargo.toml b/tower-buffer/Cargo.toml deleted file mode 100644 index c3d484a..0000000 --- a/tower-buffer/Cargo.toml +++ /dev/null @@ -1,39 +0,0 @@ -[package] -name = "tower-buffer" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-buffer/0.3.0" -description = """ -Buffer requests before dispatching to a `Service`. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[features] -log = ["tracing/log"] -default = ["log"] - -[dependencies] -futures-core = { version = "0.3", default-features = false } -pin-project = "0.4" -tower-service = "0.3" -tower-layer = "0.3" -tokio = { version = "0.2", features = ["rt-core", "sync"] } -tracing = "0.1.2" - -[dev-dependencies] -tower-test = { version = "0.3", path = "../tower-test" } -tokio-test = { version = "0.2" } -tokio = { version = "0.2", features = ["macros"] } diff --git a/tower-buffer/LICENSE b/tower-buffer/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-buffer/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-buffer/README.md b/tower-buffer/README.md deleted file mode 100644 index 3b3bfbd..0000000 --- a/tower-buffer/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Buffer - -Buffer requests before dispatching to a `Service`. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-discover/CHANGELOG.md b/tower-discover/CHANGELOG.md deleted file mode 100644 index 0803b17..0000000 --- a/tower-discover/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# 0.3.0 (December 19, 2019) - -- Update to `tower-service 0.3` -- Update to `futures-core 0.3` - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.0 (April 26, 2019) - -- Initial release diff --git a/tower-discover/Cargo.toml b/tower-discover/Cargo.toml deleted file mode 100644 index 8eb226b..0000000 --- a/tower-discover/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -name = "tower-discover" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-discover/0.3.0" -description = """ -Abstracts over service discovery strategies. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[dependencies] -futures-core = { version = "0.3", default-features = false } -tower-service = "0.3" -pin-project = "0.4" diff --git a/tower-discover/LICENSE b/tower-discover/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-discover/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-discover/README.md b/tower-discover/README.md deleted file mode 100644 index 0b0e7fd..0000000 --- a/tower-discover/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Discovery - -Abstracts over service discovery strategies. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-filter/CHANGELOG.md b/tower-filter/CHANGELOG.md deleted file mode 100644 index 4eb60cc..0000000 --- a/tower-filter/CHANGELOG.md +++ /dev/null @@ -1,12 +0,0 @@ -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 - -- Move to `std::future` - -# 0.1.0 (unreleased) - -- Initial release diff --git a/tower-filter/Cargo.toml b/tower-filter/Cargo.toml deleted file mode 100644 index 3469057..0000000 --- a/tower-filter/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "tower-filter" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-filter/0.3.0-alpha.2" -description = """ -Conditionally allow requests to be dispatched to a service based on the result -of a predicate. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" -publish = false - -[dependencies] -tower-service = "0.3" -tower-layer = "0.3" -pin-project = "0.4" -futures-core = { version = "0.3", default-features = false } - -[dev-dependencies] -tower-test = { version = "0.3", path = "../tower-test" } -futures-util = { version = "0.3", default-features = false, features = ["alloc"] } -tokio = { version = "0.2", features = ["macros", "sync"] } diff --git a/tower-filter/LICENSE b/tower-filter/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-filter/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-filter/README.md b/tower-filter/README.md deleted file mode 100644 index c862a19..0000000 --- a/tower-filter/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Tower Filter - -Conditionally allow requests to be dispatched to a service based on the result -of a predicate. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-hedge/CHANGELOG.md b/tower-hedge/CHANGELOG.md deleted file mode 100644 index 362ff4f..0000000 --- a/tower-hedge/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -# 0.3.0 (December 4, 2019) - -- Initial release \ No newline at end of file diff --git a/tower-hedge/Cargo.toml b/tower-hedge/Cargo.toml deleted file mode 100644 index c6a84ed..0000000 --- a/tower-hedge/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "tower-hedge" -version = "0.3.0" -authors = ["Alex Leong "] -edition = "2018" -publish = false - -[dependencies] -hdrhistogram = "6.0" -log = "0.4.1" -tower-service = "0.3" -tower-filter = { version = "0.3", path = "../tower-filter" } -tokio = { version = "0.2", features = ["time"] } -futures-util = { version = "0.3", default-features = false } -pin-project = "0.4" - -[dev-dependencies] -tower-test = { version = "0.3", path = "../tower-test" } -tokio-test = "0.2" -tokio = { version = "0.2", features = ["macros", "test-util"] } \ No newline at end of file diff --git a/tower-hedge/README.md b/tower-hedge/README.md deleted file mode 100644 index e69de29..0000000 diff --git a/tower-limit/CHANGELOG.md b/tower-limit/CHANGELOG.md deleted file mode 100644 index cafba0f..0000000 --- a/tower-limit/CHANGELOG.md +++ /dev/null @@ -1,22 +0,0 @@ -# 0.3.1 (March 25, 2020) - -- Implement `tower_load::Load` for `ConcurrentLimit` and `RateLimit` - (#429). - -# 0.3.0 (December 19, 2019) - -- Update to `futures 0.3` -- Update to `tokio 0.2` - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.0 (April 26, 2019) - -- Initial release diff --git a/tower-limit/Cargo.toml b/tower-limit/Cargo.toml deleted file mode 100644 index bf88054..0000000 --- a/tower-limit/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "tower-limit" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.3.x" git tag. -version = "0.3.1" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-limit/0.3.1" -description = """ -Limit maximum request rate to a `Service`. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[dependencies] -futures-core = { version = "0.3", default-features = false } -tower-service = "0.3" -tower-layer = "0.3" -tower-load = "0.3" -tokio = { version = "0.2", features = ["time"] } -pin-project = "0.4" - -[dev-dependencies] -tower-test = { version = "0.3", path = "../tower-test" } -tokio-test = "0.2" -tokio = { version = "0.2", features = ["macros", "test-util"] } diff --git a/tower-limit/LICENSE b/tower-limit/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-limit/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-limit/README.md b/tower-limit/README.md deleted file mode 100644 index 3cb2d63..0000000 --- a/tower-limit/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Rate Limit - -Limit maximum request rate to a `Service`. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-limit/src/lib.rs b/tower-limit/src/lib.rs deleted file mode 100644 index 8611c2d..0000000 --- a/tower-limit/src/lib.rs +++ /dev/null @@ -1,18 +0,0 @@ -#![doc(html_root_url = "https://docs.rs/tower-limit/0.3.1")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] -#![allow(elided_lifetimes_in_paths)] - -//! Tower middleware for limiting requests. - -pub mod concurrency; -pub mod rate; - -pub use crate::{ - concurrency::{ConcurrencyLimit, ConcurrencyLimitLayer}, - rate::{RateLimit, RateLimitLayer}, -}; diff --git a/tower-load-shed/CHANGELOG.md b/tower-load-shed/CHANGELOG.md deleted file mode 100644 index 7223835..0000000 --- a/tower-load-shed/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# 0.3.0 (December 4, 2019) - -- Update to `tower-service 0.3` -- Update to `futures 0.3` - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.0 (April 26, 2019) - -- Initial release diff --git a/tower-load-shed/Cargo.toml b/tower-load-shed/Cargo.toml deleted file mode 100644 index ee5ce3b..0000000 --- a/tower-load-shed/Cargo.toml +++ /dev/null @@ -1,34 +0,0 @@ -[package] -name = "tower-load-shed" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-load-shed/0.3.0" -description = """ -Immediately reject requests if the inner service is not ready. This is also -known as load-shedding. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[dependencies] -tower-service = "0.3" -tower-layer = "0.3" -pin-project = "0.4" -futures-core = { version = "0.3", default-features = false } - -[dev-dependencies] -tokio-test = "0.2" -tower-test = { version = "0.3", path = "../tower-test" } -tokio = { version = "0.2", features = ["macros"] } \ No newline at end of file diff --git a/tower-load-shed/LICENSE b/tower-load-shed/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-load-shed/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-load-shed/README.md b/tower-load-shed/README.md deleted file mode 100644 index 30440f6..0000000 --- a/tower-load-shed/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Tower Load Shed - -Immediately reject requests if the inner service is not ready. This is also -known as load-shedding. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-load/CHANGELOG.md b/tower-load/CHANGELOG.md deleted file mode 100644 index 36f1352..0000000 --- a/tower-load/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# 0.3.0 (December 19, 2019) - -- Update to `tower-service 0.3` -- Update to `tower-discover 0.3` - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.0 (unreleased) - -- Initial release diff --git a/tower-load/Cargo.toml b/tower-load/Cargo.toml deleted file mode 100644 index 7b698aa..0000000 --- a/tower-load/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "tower-load" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-load/0.3.0-alpha.2" -description = """ -Strategies for measuring the load of a service -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[dependencies] -futures-core = { version = "0.3", default-features = false } -log = "0.4.1" -tokio = { version = "0.2", features = ["time"] } -tower-service = "0.3" -tower-discover = { version = "0.3", path = "../tower-discover" } -pin-project = "0.4" - -[dev-dependencies] -tokio-test = "0.2" -tokio = { version = "0.2", features = ["macros", "test-util" ] } -futures-util = { version = "0.3", default-features = false } diff --git a/tower-load/LICENSE b/tower-load/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-load/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-load/README.md b/tower-load/README.md deleted file mode 100644 index f8c58a0..0000000 --- a/tower-load/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Load - -Provides strategies for measuring a service's load. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-make/CHANGELOG.md b/tower-make/CHANGELOG.md deleted file mode 100644 index eab9485..0000000 --- a/tower-make/CHANGELOG.md +++ /dev/null @@ -1,26 +0,0 @@ -# 0.3.0 (November 29, 2019) - -- Update `tokio` to `0.2`. -- Rename `io` feature to `connect`. - -# 0.3.0-alpha.2a (September 30, 2019) - -- Update `tokio-io` to `alpha.6` -- Update `tower-service` to `alpha.2` - -# 0.3.0-alpha.2 (September 20, 2019) - -- Update `tokio-io` to `alpha.5` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Bump version to match all the other crates with `std::future` - -# 0.1.0-alpha.2 (August 30, 2019) - -- Update `tokio-io` to `alpha.4` - - -# 0.1.0-alpha.1 (August 26, 2019) - -- Initial release diff --git a/tower-make/Cargo.toml b/tower-make/Cargo.toml deleted file mode 100644 index 3605090..0000000 --- a/tower-make/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[package] -name = "tower-make" -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-make/0.3.0" -description = """ -Trait aliases for Services that produce specific types of Responses. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[features] -connect = ["tokio"] - -[dependencies] -tower-service = "0.3" -tokio = { version = "0.2", optional = true } diff --git a/tower-make/LICENSE b/tower-make/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-make/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-make/README.md b/tower-make/README.md deleted file mode 100644 index 444af14..0000000 --- a/tower-make/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Service Makers - -Trait aliases for Services that produce specific types of Responses. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-make/src/lib.rs b/tower-make/src/lib.rs deleted file mode 100644 index 5977f96..0000000 --- a/tower-make/src/lib.rs +++ /dev/null @@ -1,21 +0,0 @@ -#![doc(html_root_url = "https://docs.rs/tower-make/0.3.0")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] - -//! Trait aliases for Services that produce specific types of Responses. - -#[cfg(feature = "connect")] -mod make_connection; -mod make_service; - -#[cfg(feature = "connect")] -pub use crate::make_connection::MakeConnection; -pub use crate::make_service::MakeService; - -mod sealed { - pub trait Sealed {} -} diff --git a/tower-ready-cache/CHANGELOG.md b/tower-ready-cache/CHANGELOG.md deleted file mode 100644 index f5427f4..0000000 --- a/tower-ready-cache/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# 0.3.1 (February 24, 2020) - -- Fix spurious panic (#420). -- Restore assertion from pre-`std::future::Future` (#418). -- Fix documentation URLs to point to 0.3. diff --git a/tower-ready-cache/Cargo.toml b/tower-ready-cache/Cargo.toml deleted file mode 100644 index 533cf41..0000000 --- a/tower-ready-cache/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "tower-ready-cache" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. -version = "0.3.1" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-ready-cache/0.3.1" -description = """ -Caches a set of services -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[dependencies] -futures-core = { version = "0.3", default-features = false } -futures-util = { version = "0.3", default-features = false, features = ["alloc"] } -indexmap = "1.0.2" -log = "0.4.1" -tokio = { version = "0.2", features = ["sync"] } -tower-service = "0.3" - -[dev-dependencies] -tower-test = { version = "0.3", path = "../tower-test" } -tokio-test = "0.2" - diff --git a/tower-ready-cache/README.md b/tower-ready-cache/README.md deleted file mode 100644 index 6c51f30..0000000 --- a/tower-ready-cache/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Tower Ready Cache - -Provides a set of ready services. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. - diff --git a/tower-ready-cache/src/lib.rs b/tower-ready-cache/src/lib.rs deleted file mode 100644 index dec2a81..0000000 --- a/tower-ready-cache/src/lib.rs +++ /dev/null @@ -1,11 +0,0 @@ -//! A cache of services - -#![doc(html_root_url = "https://docs.rs/tower-ready-cache/0.3.1")] -#![deny(missing_docs)] -#![deny(rust_2018_idioms)] -#![allow(elided_lifetimes_in_paths)] - -pub mod cache; -pub mod error; - -pub use self::cache::ReadyCache; diff --git a/tower-reconnect/CHANGELOG.md b/tower-reconnect/CHANGELOG.md deleted file mode 100644 index 35d0999..0000000 --- a/tower-reconnect/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# 0.3.0 (December 19, 2019) - -- Update to `tower-service 0.3` - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.0 (unreleased) - -- Initial release diff --git a/tower-reconnect/Cargo.toml b/tower-reconnect/Cargo.toml deleted file mode 100644 index 406565c..0000000 --- a/tower-reconnect/Cargo.toml +++ /dev/null @@ -1,28 +0,0 @@ -[package] -name = "tower-reconnect" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-reconnect/0.3.0-alpha.2" -description = """ -Automatically recreate a new `Service` instance when an error is encountered. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[dependencies] -log = "0.4.1" -tower-service = "0.3" -tower-make = "0.3" -pin-project = "0.4" diff --git a/tower-reconnect/LICENSE b/tower-reconnect/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-reconnect/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-reconnect/README.md b/tower-reconnect/README.md deleted file mode 100644 index be0f5ac..0000000 --- a/tower-reconnect/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Reconnect - -Automatically recreate a new `Service` instance when an error is encountered. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-retry/CHANGELOG.md b/tower-retry/CHANGELOG.md deleted file mode 100644 index fc569a8..0000000 --- a/tower-retry/CHANGELOG.md +++ /dev/null @@ -1,19 +0,0 @@ -# 0.3.0 (December 4, 2019) - -- Update to `tower-service 0.3` -- Update to `tower-layer 0.3` -- Update to `tokio 0.2` -- Update to `futures-core 0.3` - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.0 (April 26, 2019) - -- Initial release diff --git a/tower-retry/Cargo.toml b/tower-retry/Cargo.toml deleted file mode 100644 index 71c48cc..0000000 --- a/tower-retry/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "tower-retry" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-retry/0.3.0" -description = """ -Retry failed requests. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[dependencies] -tower-service = "0.3" -tower-layer = "0.3" -tokio = { version = "0.2", features = ["time"] } -pin-project = "0.4" -futures-core = { version = "0.3", default-features = false } - -[dev-dependencies] -tower-test = { version = "0.3", path = "../tower-test" } -tokio = { version = "0.2", features = ["macros", "test-util"] } -tokio-test = "0.2" -futures-util = { version = "0.3", default-features = false } diff --git a/tower-retry/LICENSE b/tower-retry/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-retry/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-retry/README.md b/tower-retry/README.md deleted file mode 100644 index 433d67f..0000000 --- a/tower-retry/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Retry - -Retry failed requests. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-spawn-ready/CHANGELOG.md b/tower-spawn-ready/CHANGELOG.md deleted file mode 100644 index 6d9fa72..0000000 --- a/tower-spawn-ready/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# 0.3.0 (December 19, 2019) - -- Update to `tower-service 0.3` -- Update to `tokio 0.2` -- Remove `Executor` usage - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.0 (unreleased) diff --git a/tower-spawn-ready/Cargo.toml b/tower-spawn-ready/Cargo.toml deleted file mode 100644 index 925b27f..0000000 --- a/tower-spawn-ready/Cargo.toml +++ /dev/null @@ -1,35 +0,0 @@ -[package] -name = "tower-spawn-ready" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-spawn-ready/0.3.0-alpha.2" -description = """ -Drives service readiness via a spawned task -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[dependencies] -futures-core = { version = "0.3", default-features = false } -futures-util = { version = "0.3", default-features = false } -pin-project = "0.4" -tower-service = "0.3" -tower-layer = "0.3" -tokio = { version = "0.2", features = ["sync"] } - -[dev-dependencies] -tower-test = { version = "0.3", path = "../tower-test" } -tokio-test = "0.2" -tokio = { version = "0.2", features = ["macros"] } \ No newline at end of file diff --git a/tower-spawn-ready/LICENSE b/tower-spawn-ready/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-spawn-ready/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-spawn-ready/README.md b/tower-spawn-ready/README.md deleted file mode 100644 index 04d9505..0000000 --- a/tower-spawn-ready/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Spawn Ready - -Spawn Ready ensures that its inner service is driven to readiness on an executor. Useful with pooling layers that may poll their inner service infrequently. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-spawn-ready/src/lib.rs b/tower-spawn-ready/src/lib.rs deleted file mode 100644 index 279a826..0000000 --- a/tower-spawn-ready/src/lib.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![doc(html_root_url = "https://docs.rs/tower-spawn-ready/0.3.0")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] -#![allow(elided_lifetimes_in_paths)] - -//! When an underlying service is not ready, drive it to readiness on a -//! background task. - -pub mod future; -mod layer; -mod make; -mod service; - -pub use crate::layer::SpawnReadyLayer; -pub use crate::make::{MakeFuture, MakeSpawnReady}; -pub use crate::service::SpawnReady; - -/// Errors produced by `SpawnReady`. -pub(crate) type Error = Box; diff --git a/tower-timeout/CHANGELOG.md b/tower-timeout/CHANGELOG.md deleted file mode 100644 index 6d06991..0000000 --- a/tower-timeout/CHANGELOG.md +++ /dev/null @@ -1,20 +0,0 @@ -# 0.3.0 (December 1, 2019) - -- Update to `tower-service 0.3` - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.1 (July 30th, 2019) - -- Add `Elapsed::new` - -# 0.1.0 (April 26, 2019) - -- Initial release diff --git a/tower-timeout/Cargo.toml b/tower-timeout/Cargo.toml deleted file mode 100644 index c501249..0000000 --- a/tower-timeout/Cargo.toml +++ /dev/null @@ -1,28 +0,0 @@ -[package] -name = "tower-timeout" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.3.x" git tag. -version = "0.3.0" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-timeout/0.3.0" -description = """ -Apply a timeout to requests, ensuring completion within a fixed time duration. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[dependencies] -tower-service = "0.3" -tower-layer = "0.3" -tokio = { version = "0.2", features = ["time"] } -pin-project = "0.4" diff --git a/tower-timeout/LICENSE b/tower-timeout/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-timeout/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-timeout/README.md b/tower-timeout/README.md deleted file mode 100644 index 0e2e237..0000000 --- a/tower-timeout/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Timeout - -Apply a timeout to requests, ensuring completion within a fixed time duration. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower-util/CHANGELOG.md b/tower-util/CHANGELOG.md deleted file mode 100644 index 2bd2913..0000000 --- a/tower-util/CHANGELOG.md +++ /dev/null @@ -1,28 +0,0 @@ -# 0.3.1 (March 23, 2020) - -- Adds `ReadyAnd` and `ServiceExt::ready_and`, which yield `&mut` to the - service when it is ready (#427). -- Adds `ReadyOneshot` and `ServiceExt::ready_oneshot`, which yield the - service when it is ready (#427). -- Updates `Ready` and `ServiceExt::ready` documentation to reflect that - they do not yield the service, just unit, when the service is ready - (#427). - -# 0.3.0 (December 19, 2019) - -- Update to `tower-serivce 0.3` -- Update to `futures 0.3` -- Update to `tokio 0.2` - -# 0.3.0-alpha.2 (September 30, 2019) - -- Move to `futures-*-preview 0.3.0-alpha.19` -- Move to `pin-project 0.4` - -# 0.3.0-alpha.1 (September 11, 2019) - -- Move to `std::future` - -# 0.1.0 (April 26, 2019) - -- Initial release diff --git a/tower-util/Cargo.toml b/tower-util/Cargo.toml deleted file mode 100644 index 6fa4a41..0000000 --- a/tower-util/Cargo.toml +++ /dev/null @@ -1,41 +0,0 @@ -[package] - -name = "tower-util" -# When releasing to crates.io: -# - Remove path dependencies -# - Update html_root_url. -# - Update doc url -# - Cargo.toml -# - README.md -# - Update CHANGELOG.md. -# - Create "v0.3.x" git tag. -version = "0.3.1" -authors = ["Tower Maintainers "] -license = "MIT" -readme = "README.md" -repository = "https://github.com/tower-rs/tower" -homepage = "https://github.com/tower-rs/tower" -documentation = "https://docs.rs/tower-util/0.3.1" -description = """ -Utilities for working with `Service`. -""" -categories = ["asynchronous", "network-programming"] -edition = "2018" - -[features] -default = ["call-all"] -call-all = ["futures-util"] - -[dependencies] -tower-service = "0.3" -pin-project = "0.4" -futures-core = { version = "0.3", default-features = false } - -# Optional - -futures-util = { version = "0.3", optional = true, default-features = false, features = ["alloc"] } - -[dev-dependencies] -tokio-test = "0.2" -tokio = { version = "0.2", features = ["stream", "sync", "macros"] } -tower-test = { version = "0.3", path = "../tower-test" } diff --git a/tower-util/LICENSE b/tower-util/LICENSE deleted file mode 100644 index b980cac..0000000 --- a/tower-util/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2019 Tower Contributors - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/tower-util/README.md b/tower-util/README.md deleted file mode 100644 index fbb9d3b..0000000 --- a/tower-util/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Tower Service Util - -Utilities for working with `Service`. - -## License - -This project is licensed under the [MIT license](LICENSE). - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Tower by you, shall be licensed as MIT, without any additional -terms or conditions. diff --git a/tower/CHANGELOG.md b/tower/CHANGELOG.md index d18c994..e9751f0 100644 --- a/tower/CHANGELOG.md +++ b/tower/CHANGELOG.md @@ -1,3 +1,19 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] +### Added + +### Changed + + - All middleware `tower-*` crates were merged into `tower` and placed + behind feature flags. + +### Removed + # 0.3.1 (January 17, 2020) - Allow opting out of tracing/log (#410). diff --git a/tower/Cargo.toml b/tower/Cargo.toml index f450f1f..fe3de16 100644 --- a/tower/Cargo.toml +++ b/tower/Cargo.toml @@ -7,7 +7,7 @@ name = "tower" # - Cargo.toml # - README.md # - Update CHANGELOG.md. -# - Create "v0.1.x" git tag. +# - Create "vX.X.X" git tag. version = "0.3.1" authors = ["Tower Maintainers "] license = "MIT" @@ -24,26 +24,44 @@ keywords = ["io", "async", "non-blocking", "futures", "service"] edition = "2018" [features] -default = ["full", "log"] -full = [] -log = ["tower-buffer/log"] +default = ["log"] +log = ["tracing/log"] +balance = ["discover", "load", "ready-cache", "make"] +buffer = [] +discover = [] +filter = [] +hedge = ["filter"] +limit = [] +load = ["discover"] +load-shed = [] +make = [] +ready-cache = [] +reconnect = ["make"] +retry = [] +spawn-ready = [] +timeout = [] +util = [] [dependencies] -tower-buffer = { version = "0.3", path = "../tower-buffer", default-features = false } -tower-discover = { version = "0.3", path = "../tower-discover" } -tower-layer = "0.3" -tower-limit = { version = "0.3", path = "../tower-limit" } -tower-load-shed = { version = "0.3", path = "../tower-load-shed" } -tower-retry = { version = "0.3", path = "../tower-retry" } -tower-service = "0.3" -tower-timeout = { version = "0.3", path = "../tower-timeout" } -tower-util = { version = "0.3", path = "../tower-util", features = ["call-all"] } -futures-core = { version = "0.3", default-features = false } +futures-core = "0.3" +futures-util = { version = "0.3", default-features = false, features = ["alloc"] } +hdrhistogram = "6.0" +indexmap = "1.0.2" +pin-project = "0.4" +rand = { version = "0.7", features = ["small_rng"] } +slab = "0.4" +tokio = { version = "0.2", features = ["rt-core", "sync", "time"] } +tower-layer = { version = "0.3", path = "../tower-layer" } +tower-service = { version = "0.3", path = "../tower-service" } +tracing = "0.1.2" [dev-dependencies] -# env_logger = { version = "0.5.3", default-features = false } -futures-util = { version = "0.3", default-features = false } -tokio = { version = "0.2", features = ["macros"] } -# log = "0.4.1" -# # tokio = "0.2" +futures-util = { version = "0.3", default-features = false, features = ["alloc"] } +hdrhistogram = "6.0" +quickcheck = { version = "0.6", default-features = false } +tokio = { version = "0.2", features = ["macros", "stream", "sync", "test-util" ] } +tokio-test = "0.2" tower-test = { version = "0.3", path = "../tower-test" } +tracing-subscriber = "0.1.1" +# env_logger = { version = "0.5.3", default-features = false } +# log = "0.4.1" diff --git a/tower-balance/src/error.rs b/tower/src/balance/error.rs similarity index 100% rename from tower-balance/src/error.rs rename to tower/src/balance/error.rs diff --git a/tower/src/balance/mod.rs b/tower/src/balance/mod.rs new file mode 100644 index 0000000..21a3948 --- /dev/null +++ b/tower/src/balance/mod.rs @@ -0,0 +1,5 @@ +//! Load balancing middlewares. + +pub mod error; +pub mod p2c; +pub mod pool; diff --git a/tower-balance/src/p2c/layer.rs b/tower/src/balance/p2c/layer.rs similarity index 100% rename from tower-balance/src/p2c/layer.rs rename to tower/src/balance/p2c/layer.rs diff --git a/tower-balance/src/p2c/make.rs b/tower/src/balance/p2c/make.rs similarity index 97% rename from tower-balance/src/p2c/make.rs rename to tower/src/balance/p2c/make.rs index 01d8f24..f8e8b93 100644 --- a/tower-balance/src/p2c/make.rs +++ b/tower/src/balance/p2c/make.rs @@ -1,5 +1,6 @@ +use super::super::error; use super::Balance; -use crate::error; +use crate::discover::Discover; use futures_core::ready; use pin_project::pin_project; use rand::{rngs::SmallRng, SeedableRng}; @@ -9,7 +10,6 @@ use std::{ pin::Pin, task::{Context, Poll}, }; -use tower_discover::Discover; use tower_service::Service; /// Makes `Balancer`s given an inner service that makes `Discover`s. diff --git a/tower-balance/src/p2c/mod.rs b/tower/src/balance/p2c/mod.rs similarity index 100% rename from tower-balance/src/p2c/mod.rs rename to tower/src/balance/p2c/mod.rs diff --git a/tower-balance/src/p2c/service.rs b/tower/src/balance/p2c/service.rs similarity index 98% rename from tower-balance/src/p2c/service.rs rename to tower/src/balance/p2c/service.rs index a3723ea..cc2058e 100644 --- a/tower-balance/src/p2c/service.rs +++ b/tower/src/balance/p2c/service.rs @@ -1,4 +1,7 @@ -use crate::error; +use super::super::error; +use crate::discover::{Change, Discover}; +use crate::load::Load; +use crate::ready_cache::{error::Failed, ReadyCache}; use futures_core::ready; use futures_util::future::{self, TryFutureExt}; use pin_project::pin_project; @@ -11,9 +14,6 @@ use std::{ task::{Context, Poll}, }; use tokio::sync::oneshot; -use tower_discover::{Change, Discover}; -use tower_load::Load; -use tower_ready_cache::{error::Failed, ReadyCache}; use tower_service::Service; use tracing::{debug, trace}; diff --git a/tower-balance/src/p2c/test.rs b/tower/src/balance/p2c/test.rs similarity index 100% rename from tower-balance/src/p2c/test.rs rename to tower/src/balance/p2c/test.rs diff --git a/tower-balance/src/pool/mod.rs b/tower/src/balance/pool/mod.rs similarity index 99% rename from tower-balance/src/pool/mod.rs rename to tower/src/balance/pool/mod.rs index 46efb14..b049d49 100644 --- a/tower-balance/src/pool/mod.rs +++ b/tower/src/balance/pool/mod.rs @@ -14,8 +14,11 @@ //! added or removed. #![deny(missing_docs)] +use super::error; use super::p2c::Balance; -use crate::error; +use crate::discover::{Change, Discover}; +use crate::load::Load; +use crate::make::MakeService; use futures_core::ready; use pin_project::pin_project; use slab::Slab; @@ -25,9 +28,6 @@ use std::{ pin::Pin, task::{Context, Poll}, }; -use tower_discover::{Change, Discover}; -use tower_load::Load; -use tower_make::MakeService; use tower_service::Service; #[cfg(test)] diff --git a/tower-balance/src/pool/test.rs b/tower/src/balance/pool/test.rs similarity index 100% rename from tower-balance/src/pool/test.rs rename to tower/src/balance/pool/test.rs diff --git a/tower-buffer/src/error.rs b/tower/src/buffer/error.rs similarity index 100% rename from tower-buffer/src/error.rs rename to tower/src/buffer/error.rs diff --git a/tower-buffer/src/future.rs b/tower/src/buffer/future.rs similarity index 99% rename from tower-buffer/src/future.rs rename to tower/src/buffer/future.rs index 6fb8ecd..66f1995 100644 --- a/tower-buffer/src/future.rs +++ b/tower/src/buffer/future.rs @@ -1,6 +1,6 @@ //! Future types -use crate::{ +use super::{ error::{Closed, Error}, message, }; diff --git a/tower-buffer/src/layer.rs b/tower/src/buffer/layer.rs similarity index 95% rename from tower-buffer/src/layer.rs rename to tower/src/buffer/layer.rs index 7f19480..faa5fa6 100644 --- a/tower-buffer/src/layer.rs +++ b/tower/src/buffer/layer.rs @@ -1,4 +1,4 @@ -use crate::{error::Error, service::Buffer}; +use super::{error::Error, service::Buffer}; use std::{fmt, marker::PhantomData}; use tower_layer::Layer; use tower_service::Service; diff --git a/tower-buffer/src/message.rs b/tower/src/buffer/message.rs similarity index 92% rename from tower-buffer/src/message.rs rename to tower/src/buffer/message.rs index 98e7744..6d13aa1 100644 --- a/tower-buffer/src/message.rs +++ b/tower/src/buffer/message.rs @@ -1,4 +1,4 @@ -use crate::error::ServiceError; +use super::error::ServiceError; use tokio::sync::oneshot; /// Message sent over buffer diff --git a/tower-buffer/src/lib.rs b/tower/src/buffer/mod.rs similarity index 61% rename from tower-buffer/src/lib.rs rename to tower/src/buffer/mod.rs index 24499d7..a7afe64 100644 --- a/tower-buffer/src/lib.rs +++ b/tower/src/buffer/mod.rs @@ -1,12 +1,3 @@ -#![doc(html_root_url = "https://docs.rs/tower-buffer/0.3.0")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] -#![allow(elided_lifetimes_in_paths)] - //! Buffer requests when the inner service is out of capacity. //! //! Buffering works by spawning a new task that is dedicated to pulling requests @@ -21,5 +12,5 @@ mod message; mod service; mod worker; -pub use crate::layer::BufferLayer; -pub use crate::service::Buffer; +pub use self::layer::BufferLayer; +pub use self::service::Buffer; diff --git a/tower-buffer/src/service.rs b/tower/src/buffer/service.rs similarity index 99% rename from tower-buffer/src/service.rs rename to tower/src/buffer/service.rs index 3d55738..63227c4 100644 --- a/tower-buffer/src/service.rs +++ b/tower/src/buffer/service.rs @@ -1,4 +1,4 @@ -use crate::{ +use super::{ error::Error, future::ResponseFuture, message::Message, diff --git a/tower-buffer/src/worker.rs b/tower/src/buffer/worker.rs similarity index 99% rename from tower-buffer/src/worker.rs rename to tower/src/buffer/worker.rs index 94bee09..c0f82d3 100644 --- a/tower-buffer/src/worker.rs +++ b/tower/src/buffer/worker.rs @@ -1,4 +1,4 @@ -use crate::{ +use super::{ error::{Closed, Error, ServiceError}, message::Message, }; diff --git a/tower/src/builder/mod.rs b/tower/src/builder/mod.rs index 7896e9e..84be92b 100644 --- a/tower/src/builder/mod.rs +++ b/tower/src/builder/mod.rs @@ -1,16 +1,8 @@ //! Builder types to compose layers and services -use crate::{ - buffer::BufferLayer, - limit::{concurrency::ConcurrencyLimitLayer, rate::RateLimitLayer}, - load_shed::LoadShedLayer, - retry::RetryLayer, - timeout::TimeoutLayer, -}; - use tower_layer::{Identity, Layer, Stack}; -use std::{fmt, time::Duration}; +use std::fmt; /// Declaratively construct Service values. /// @@ -125,8 +117,12 @@ impl ServiceBuilder { } /// Buffer requests when when the next layer is out of capacity. - pub fn buffer(self, bound: usize) -> ServiceBuilder, L>> { - self.layer(BufferLayer::new(bound)) + #[cfg(feature = "buffer")] + pub fn buffer( + self, + bound: usize, + ) -> ServiceBuilder, L>> { + self.layer(crate::buffer::BufferLayer::new(bound)) } /// Limit the max number of in-flight requests. @@ -134,8 +130,12 @@ impl ServiceBuilder { /// A request is in-flight from the time the request is received until the /// response future completes. This includes the time spent in the next /// layers. - pub fn concurrency_limit(self, max: usize) -> ServiceBuilder> { - self.layer(ConcurrencyLimitLayer::new(max)) + #[cfg(feature = "limit")] + pub fn concurrency_limit( + self, + max: usize, + ) -> ServiceBuilder> { + self.layer(crate::limit::ConcurrencyLimitLayer::new(max)) } /// Drop requests when the next layer is unable to respond to requests. @@ -146,13 +146,19 @@ impl ServiceBuilder { /// /// `load_shed` immediately responds with an error when the next layer is /// out of capacity. - pub fn load_shed(self) -> ServiceBuilder> { - self.layer(LoadShedLayer::new()) + #[cfg(feature = "load-shed")] + pub fn load_shed(self) -> ServiceBuilder> { + self.layer(crate::load_shed::LoadShedLayer::new()) } /// Limit requests to at most `num` per the given duration - pub fn rate_limit(self, num: u64, per: Duration) -> ServiceBuilder> { - self.layer(RateLimitLayer::new(num, per)) + #[cfg(feature = "limit")] + pub fn rate_limit( + self, + num: u64, + per: std::time::Duration, + ) -> ServiceBuilder> { + self.layer(crate::limit::RateLimitLayer::new(num, per)) } /// Retry failed requests. @@ -160,16 +166,21 @@ impl ServiceBuilder { /// `policy` must implement [`Policy`]. /// /// [`Policy`]: ../retry/trait.Policy.html - pub fn retry

(self, policy: P) -> ServiceBuilder, L>> { - self.layer(RetryLayer::new(policy)) + #[cfg(feature = "retry")] + pub fn retry

(self, policy: P) -> ServiceBuilder, L>> { + self.layer(crate::retry::RetryLayer::new(policy)) } /// Fail requests that take longer than `timeout`. /// /// If the next layer takes more than `timeout` to respond to a request, /// processing is terminated and an error is returned. - pub fn timeout(self, timeout: Duration) -> ServiceBuilder> { - self.layer(TimeoutLayer::new(timeout)) + #[cfg(feature = "timeout")] + pub fn timeout( + self, + timeout: std::time::Duration, + ) -> ServiceBuilder> { + self.layer(crate::timeout::TimeoutLayer::new(timeout)) } /// Obtains the underlying `Layer` implementation. diff --git a/tower-discover/src/error.rs b/tower/src/discover/error.rs similarity index 100% rename from tower-discover/src/error.rs rename to tower/src/discover/error.rs diff --git a/tower-discover/src/list.rs b/tower/src/discover/list.rs similarity index 97% rename from tower-discover/src/list.rs rename to tower/src/discover/list.rs index 2a0c80e..8f8beb1 100644 --- a/tower-discover/src/list.rs +++ b/tower/src/discover/list.rs @@ -1,4 +1,4 @@ -use crate::{error::Never, Change, Discover}; +use super::{error::Never, Change, Discover}; use pin_project::pin_project; use std::iter::{Enumerate, IntoIterator}; use std::{ diff --git a/tower-discover/src/lib.rs b/tower/src/discover/mod.rs similarity index 90% rename from tower-discover/src/lib.rs rename to tower/src/discover/mod.rs index 27d8fc3..0492297 100644 --- a/tower-discover/src/lib.rs +++ b/tower/src/discover/mod.rs @@ -1,12 +1,3 @@ -#![doc(html_root_url = "https://docs.rs/tower-discover/0.3.0")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] -#![allow(elided_lifetimes_in_paths)] - //! # Tower service discovery //! //! Service discovery is the automatic detection of services available to the @@ -18,7 +9,7 @@ mod error; mod list; mod stream; -pub use crate::{list::ServiceList, stream::ServiceStream}; +pub use self::{list::ServiceList, stream::ServiceStream}; use std::hash::Hash; use std::ops; diff --git a/tower-discover/src/stream.rs b/tower/src/discover/stream.rs similarity index 97% rename from tower-discover/src/stream.rs rename to tower/src/discover/stream.rs index ea2f90e..488221a 100644 --- a/tower-discover/src/stream.rs +++ b/tower/src/discover/stream.rs @@ -1,4 +1,4 @@ -use crate::{Change, Discover}; +use super::{Change, Discover}; use futures_core::{ready, TryStream}; use pin_project::pin_project; use std::hash::Hash; diff --git a/tower-filter/src/error.rs b/tower/src/filter/error.rs similarity index 100% rename from tower-filter/src/error.rs rename to tower/src/filter/error.rs diff --git a/tower-filter/src/future.rs b/tower/src/filter/future.rs similarity index 98% rename from tower-filter/src/future.rs rename to tower/src/filter/future.rs index 31a9655..1c07426 100644 --- a/tower-filter/src/future.rs +++ b/tower/src/filter/future.rs @@ -1,6 +1,6 @@ //! Future types -use crate::error::{self, Error}; +use super::error::{self, Error}; use futures_core::ready; use pin_project::{pin_project, project}; use std::{ diff --git a/tower-filter/src/layer.rs b/tower/src/filter/layer.rs similarity index 96% rename from tower-filter/src/layer.rs rename to tower/src/filter/layer.rs index a779b29..92f368e 100644 --- a/tower-filter/src/layer.rs +++ b/tower/src/filter/layer.rs @@ -1,4 +1,4 @@ -use crate::Filter; +use super::Filter; use tower_layer::Layer; /// Conditionally dispatch requests to the inner service based on a predicate. diff --git a/tower-filter/src/lib.rs b/tower/src/filter/mod.rs similarity index 80% rename from tower-filter/src/lib.rs rename to tower/src/filter/mod.rs index bffd21a..23d668b 100644 --- a/tower-filter/src/lib.rs +++ b/tower/src/filter/mod.rs @@ -1,12 +1,3 @@ -#![doc(html_root_url = "https://docs.rs/tower-filter/0.3.0-alpha.2")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] -#![allow(elided_lifetimes_in_paths)] - //! Conditionally dispatch requests to the inner service based on the result of //! a predicate. @@ -15,9 +6,9 @@ pub mod future; mod layer; mod predicate; -pub use crate::{layer::FilterLayer, predicate::Predicate}; +pub use self::{layer::FilterLayer, predicate::Predicate}; -use crate::{error::Error, future::ResponseFuture}; +use self::{error::Error, future::ResponseFuture}; use futures_core::ready; use std::task::{Context, Poll}; use tower_service::Service; diff --git a/tower-filter/src/predicate.rs b/tower/src/filter/predicate.rs similarity index 96% rename from tower-filter/src/predicate.rs rename to tower/src/filter/predicate.rs index 34d2e58..52b3936 100644 --- a/tower-filter/src/predicate.rs +++ b/tower/src/filter/predicate.rs @@ -1,4 +1,4 @@ -use crate::error::Error; +use super::error::Error; use std::future::Future; /// Checks a request diff --git a/tower-hedge/src/delay.rs b/tower/src/hedge/delay.rs similarity index 100% rename from tower-hedge/src/delay.rs rename to tower/src/hedge/delay.rs diff --git a/tower-hedge/src/latency.rs b/tower/src/hedge/latency.rs similarity index 100% rename from tower-hedge/src/latency.rs rename to tower/src/hedge/latency.rs diff --git a/tower-hedge/src/lib.rs b/tower/src/hedge/mod.rs similarity index 96% rename from tower-hedge/src/lib.rs rename to tower/src/hedge/mod.rs index bd78ba8..807ecd5 100644 --- a/tower-hedge/src/lib.rs +++ b/tower/src/hedge/mod.rs @@ -8,8 +8,8 @@ unreachable_pub )] +use crate::filter::Filter; use futures_util::future; -use log::error; use pin_project::pin_project; use std::sync::{Arc, Mutex}; use std::time::Duration; @@ -17,7 +17,7 @@ use std::{ pin::Pin, task::{Context, Poll}, }; -use tower_filter::Filter; +use tracing::error; mod delay; mod latency; @@ -220,13 +220,13 @@ impl latency::Record for Histo { } } -impl tower_filter::Predicate for PolicyPredicate

+impl crate::filter::Predicate for PolicyPredicate

where P: Policy, { type Future = future::Either< - future::Ready>, - future::Pending>, + future::Ready>, + future::Pending>, >; fn check(&mut self, request: &Request) -> Self::Future { diff --git a/tower-hedge/src/rotating_histogram.rs b/tower/src/hedge/rotating_histogram.rs similarity index 99% rename from tower-hedge/src/rotating_histogram.rs rename to tower/src/hedge/rotating_histogram.rs index 87f371b..79f6dc6 100644 --- a/tower-hedge/src/rotating_histogram.rs +++ b/tower/src/hedge/rotating_histogram.rs @@ -1,7 +1,7 @@ use hdrhistogram::Histogram; -use log::trace; use std::time::Duration; use tokio::time::Instant; +use tracing::trace; /// This represents a "rotating" histogram which stores two histogram, one which /// should be read and one which should be written to. Every period, the read diff --git a/tower-hedge/src/select.rs b/tower/src/hedge/select.rs similarity index 100% rename from tower-hedge/src/select.rs rename to tower/src/hedge/select.rs diff --git a/tower/src/lib.rs b/tower/src/lib.rs index 47b24ca..a68bec0 100644 --- a/tower/src/lib.rs +++ b/tower/src/lib.rs @@ -1,38 +1,53 @@ #![doc(html_root_url = "https://docs.rs/tower/0.3.1")] -// Allows refining features in the future without breaking backwards -// compatibility -#![cfg(feature = "full")] #![warn( missing_debug_implementations, missing_docs, rust_2018_idioms, unreachable_pub )] +#![allow(elided_lifetimes_in_paths)] //! `fn(Request) -> Future` //! //! Tower is a library of modular and reusable components for building //! robust networking clients and servers. -#[doc(inline)] -pub use tower_buffer as buffer; -#[doc(inline)] -pub use tower_discover as discover; -#[doc(inline)] -pub use tower_limit as limit; -#[doc(inline)] -pub use tower_load_shed as load_shed; -#[doc(inline)] -pub use tower_retry as retry; -#[doc(inline)] -pub use tower_timeout as timeout; -// pub use tower_layer as layer; -#[doc(inline)] -pub use tower_layer as layer; - -pub mod builder; +#[cfg(feature = "balance")] +pub mod balance; +#[cfg(feature = "buffer")] +pub mod buffer; +#[cfg(feature = "discover")] +pub mod discover; +#[cfg(feature = "filter")] +#[allow(unreachable_pub)] +pub(crate) mod filter; +#[cfg(feature = "hedge")] +#[allow(unreachable_pub)] +pub(crate) mod hedge; +#[cfg(feature = "limit")] +pub mod limit; +#[cfg(feature = "load")] +pub mod load; +#[cfg(feature = "load-shed")] +pub mod load_shed; +#[cfg(feature = "make")] +pub mod make; +#[cfg(feature = "ready-cache")] +pub mod ready_cache; +#[cfg(feature = "reconnect")] +pub mod reconnect; +#[cfg(feature = "retry")] +pub mod retry; +#[cfg(feature = "spawn-ready")] +pub mod spawn_ready; +#[cfg(feature = "timeout")] +pub mod timeout; +#[cfg(feature = "util")] pub mod util; -pub use crate::{builder::ServiceBuilder, util::ServiceExt}; +pub mod builder; + +#[cfg(feature = "util")] +pub use self::util::{service_fn, ServiceExt}; +pub use crate::builder::ServiceBuilder; pub use tower_service::Service; -pub use tower_util::service_fn; diff --git a/tower-limit/src/concurrency/future.rs b/tower/src/limit/concurrency/future.rs similarity index 100% rename from tower-limit/src/concurrency/future.rs rename to tower/src/limit/concurrency/future.rs diff --git a/tower-limit/src/concurrency/layer.rs b/tower/src/limit/concurrency/layer.rs similarity index 100% rename from tower-limit/src/concurrency/layer.rs rename to tower/src/limit/concurrency/layer.rs diff --git a/tower-limit/src/concurrency/mod.rs b/tower/src/limit/concurrency/mod.rs similarity index 100% rename from tower-limit/src/concurrency/mod.rs rename to tower/src/limit/concurrency/mod.rs diff --git a/tower-limit/src/concurrency/never.rs b/tower/src/limit/concurrency/never.rs similarity index 100% rename from tower-limit/src/concurrency/never.rs rename to tower/src/limit/concurrency/never.rs diff --git a/tower-limit/src/concurrency/service.rs b/tower/src/limit/concurrency/service.rs similarity index 96% rename from tower-limit/src/concurrency/service.rs rename to tower/src/limit/concurrency/service.rs index bac2695..cf4ba4c 100644 --- a/tower-limit/src/concurrency/service.rs +++ b/tower/src/limit/concurrency/service.rs @@ -86,9 +86,10 @@ where } } -impl tower_load::Load for ConcurrencyLimit +#[cfg(feature = "load")] +impl crate::load::Load for ConcurrencyLimit where - S: tower_load::Load, + S: crate::load::Load, { type Metric = S::Metric; fn load(&self) -> Self::Metric { diff --git a/tower-limit/src/concurrency/sync/cell.rs b/tower/src/limit/concurrency/sync/cell.rs similarity index 100% rename from tower-limit/src/concurrency/sync/cell.rs rename to tower/src/limit/concurrency/sync/cell.rs diff --git a/tower-limit/src/concurrency/sync/mod.rs b/tower/src/limit/concurrency/sync/mod.rs similarity index 100% rename from tower-limit/src/concurrency/sync/mod.rs rename to tower/src/limit/concurrency/sync/mod.rs diff --git a/tower-limit/src/concurrency/sync/semaphore.rs b/tower/src/limit/concurrency/sync/semaphore.rs similarity index 100% rename from tower-limit/src/concurrency/sync/semaphore.rs rename to tower/src/limit/concurrency/sync/semaphore.rs diff --git a/tower-limit/src/concurrency/sync/waker.rs b/tower/src/limit/concurrency/sync/waker.rs similarity index 100% rename from tower-limit/src/concurrency/sync/waker.rs rename to tower/src/limit/concurrency/sync/waker.rs diff --git a/tower/src/limit/mod.rs b/tower/src/limit/mod.rs new file mode 100644 index 0000000..9af07e1 --- /dev/null +++ b/tower/src/limit/mod.rs @@ -0,0 +1,9 @@ +//! Tower middleware for limiting requests. + +pub mod concurrency; +pub mod rate; + +pub use self::{ + concurrency::{ConcurrencyLimit, ConcurrencyLimitLayer}, + rate::{RateLimit, RateLimitLayer}, +}; diff --git a/tower-limit/src/rate/layer.rs b/tower/src/limit/rate/layer.rs similarity index 100% rename from tower-limit/src/rate/layer.rs rename to tower/src/limit/rate/layer.rs diff --git a/tower-limit/src/rate/mod.rs b/tower/src/limit/rate/mod.rs similarity index 100% rename from tower-limit/src/rate/mod.rs rename to tower/src/limit/rate/mod.rs diff --git a/tower-limit/src/rate/rate.rs b/tower/src/limit/rate/rate.rs similarity index 100% rename from tower-limit/src/rate/rate.rs rename to tower/src/limit/rate/rate.rs diff --git a/tower-limit/src/rate/service.rs b/tower/src/limit/rate/service.rs similarity index 96% rename from tower-limit/src/rate/service.rs rename to tower/src/limit/rate/service.rs index 76d40b9..7e55ec8 100644 --- a/tower-limit/src/rate/service.rs +++ b/tower/src/limit/rate/service.rs @@ -109,9 +109,10 @@ where } } -impl tower_load::Load for RateLimit +#[cfg(feature = "load")] +impl crate::load::Load for RateLimit where - S: tower_load::Load, + S: crate::load::Load, { type Metric = S::Metric; fn load(&self) -> Self::Metric { diff --git a/tower-load/src/constant.rs b/tower/src/load/constant.rs similarity index 96% rename from tower-load/src/constant.rs rename to tower/src/load/constant.rs index 2481166..4d78af7 100644 --- a/tower-load/src/constant.rs +++ b/tower/src/load/constant.rs @@ -1,15 +1,15 @@ //! A constant `Load` implementation. Primarily useful for testing. +use crate::discover::{Change, Discover}; use futures_core::ready; use pin_project::pin_project; use std::{ pin::Pin, task::{Context, Poll}, }; -use tower_discover::{Change, Discover}; use tower_service::Service; -use crate::Load; +use super::Load; /// Wraps a type so that `Load::load` returns a constant value. #[pin_project] diff --git a/tower-load/src/instrument.rs b/tower/src/load/instrument.rs similarity index 100% rename from tower-load/src/instrument.rs rename to tower/src/load/instrument.rs diff --git a/tower-load/src/lib.rs b/tower/src/load/mod.rs similarity index 74% rename from tower-load/src/lib.rs rename to tower/src/load/mod.rs index c951621..fdd1f19 100644 --- a/tower-load/src/lib.rs +++ b/tower/src/load/mod.rs @@ -1,14 +1,5 @@ //! Abstractions and utilties for measuring a service's load. -#![doc(html_root_url = "https://docs.rs/tower-load/0.3.0")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] -#![allow(elided_lifetimes_in_paths)] - mod constant; mod instrument; pub mod peak_ewma; diff --git a/tower-load/src/peak_ewma.rs b/tower/src/load/peak_ewma.rs similarity index 99% rename from tower-load/src/peak_ewma.rs rename to tower/src/load/peak_ewma.rs index 7e3bb85..6e16e8a 100644 --- a/tower-load/src/peak_ewma.rs +++ b/tower/src/load/peak_ewma.rs @@ -1,9 +1,9 @@ //! A `Load` implementation that PeakEWMA on response latency. +use super::Load; use super::{Instrument, InstrumentFuture, NoInstrument}; -use crate::Load; +use crate::discover::{Change, Discover}; use futures_core::ready; -use log::trace; use pin_project::pin_project; use std::{ pin::Pin, @@ -14,8 +14,8 @@ use std::{ time::Duration, }; use tokio::time::Instant; -use tower_discover::{Change, Discover}; use tower_service::Service; +use tracing::trace; /// Wraps an `S`-typed Service with Peak-EWMA load measurement. /// diff --git a/tower-load/src/pending_requests.rs b/tower/src/load/pending_requests.rs similarity index 98% rename from tower-load/src/pending_requests.rs rename to tower/src/load/pending_requests.rs index e550f86..a881fa3 100644 --- a/tower-load/src/pending_requests.rs +++ b/tower/src/load/pending_requests.rs @@ -1,7 +1,8 @@ //! A `Load` implementation that uses the count of in-flight requests. +use super::Load; use super::{Instrument, InstrumentFuture, NoInstrument}; -use crate::Load; +use crate::discover::{Change, Discover}; use futures_core::ready; use pin_project::pin_project; use std::sync::Arc; @@ -9,7 +10,6 @@ use std::{ pin::Pin, task::{Context, Poll}, }; -use tower_discover::{Change, Discover}; use tower_service::Service; /// Expresses load based on the number of currently-pending requests. diff --git a/tower-load-shed/src/error.rs b/tower/src/load_shed/error.rs similarity index 100% rename from tower-load-shed/src/error.rs rename to tower/src/load_shed/error.rs diff --git a/tower-load-shed/src/future.rs b/tower/src/load_shed/future.rs similarity index 97% rename from tower-load-shed/src/future.rs rename to tower/src/load_shed/future.rs index 331c495..ed3c339 100644 --- a/tower-load-shed/src/future.rs +++ b/tower/src/load_shed/future.rs @@ -8,7 +8,7 @@ use std::task::{Context, Poll}; use futures_core::ready; use pin_project::{pin_project, project}; -use crate::error::{Error, Overloaded}; +use super::error::{Error, Overloaded}; /// Future for the `LoadShed` service. #[pin_project] diff --git a/tower-load-shed/src/layer.rs b/tower/src/load_shed/layer.rs similarity index 96% rename from tower-load-shed/src/layer.rs rename to tower/src/load_shed/layer.rs index 3a2f0fb..96aa2fd 100644 --- a/tower-load-shed/src/layer.rs +++ b/tower/src/load_shed/layer.rs @@ -1,7 +1,7 @@ use std::fmt; use tower_layer::Layer; -use crate::LoadShed; +use super::LoadShed; /// A `tower-layer` to wrap services in `LoadShed` middleware. #[derive(Clone)] diff --git a/tower-load-shed/src/lib.rs b/tower/src/load_shed/mod.rs similarity index 86% rename from tower-load-shed/src/lib.rs rename to tower/src/load_shed/mod.rs index 1a8cb2b..d1e405b 100644 --- a/tower-load-shed/src/lib.rs +++ b/tower/src/load_shed/mod.rs @@ -1,12 +1,3 @@ -#![doc(html_root_url = "https://docs.rs/tower-load-shed/0.3.0")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] -#![allow(elided_lifetimes_in_paths)] - //! Tower middleware for shedding load when inner services aren't ready. use std::task::{Context, Poll}; @@ -16,9 +7,9 @@ pub mod error; pub mod future; mod layer; -use crate::error::Error; -use crate::future::ResponseFuture; -pub use crate::layer::LoadShedLayer; +use self::error::Error; +use self::future::ResponseFuture; +pub use self::layer::LoadShedLayer; /// A `Service` that sheds load when the inner service isn't ready. #[derive(Debug)] diff --git a/tower-make/src/make_connection.rs b/tower/src/make/make_connection.rs similarity index 98% rename from tower-make/src/make_connection.rs rename to tower/src/make/make_connection.rs index 03b8313..bd50a41 100644 --- a/tower-make/src/make_connection.rs +++ b/tower/src/make/make_connection.rs @@ -1,4 +1,4 @@ -use crate::sealed::Sealed; +use super::sealed::Sealed; use std::future::Future; use std::task::{Context, Poll}; use tokio::io::{AsyncRead, AsyncWrite}; diff --git a/tower-make/src/make_service.rs b/tower/src/make/make_service.rs similarity index 98% rename from tower-make/src/make_service.rs rename to tower/src/make/make_service.rs index 4df56d7..96fa4bc 100644 --- a/tower-make/src/make_service.rs +++ b/tower/src/make/make_service.rs @@ -1,4 +1,4 @@ -use crate::sealed::Sealed; +use super::sealed::Sealed; use std::future::Future; use std::task::{Context, Poll}; use tower_service::Service; diff --git a/tower/src/make/mod.rs b/tower/src/make/mod.rs new file mode 100644 index 0000000..d0a841b --- /dev/null +++ b/tower/src/make/mod.rs @@ -0,0 +1,11 @@ +//! Trait aliases for Services that produce specific types of Responses. + +mod make_connection; +mod make_service; + +pub use self::make_connection::MakeConnection; +pub use self::make_service::MakeService; + +mod sealed { + pub trait Sealed {} +} diff --git a/tower-ready-cache/src/cache.rs b/tower/src/ready_cache/cache.rs similarity index 99% rename from tower-ready-cache/src/cache.rs rename to tower/src/ready_cache/cache.rs index a32ced4..3218423 100644 --- a/tower-ready-cache/src/cache.rs +++ b/tower/src/ready_cache/cache.rs @@ -1,17 +1,17 @@ //! A cache of services. -use crate::error; +use super::error; use futures_core::Stream; use futures_util::stream::FuturesUnordered; pub use indexmap::Equivalent; use indexmap::IndexMap; -use log::{debug, trace}; use std::future::Future; use std::hash::Hash; use std::pin::Pin; use std::task::{Context, Poll}; use tokio::sync::oneshot; use tower_service::Service; +use tracing::{debug, trace}; /// Drives readiness over a set of services. /// diff --git a/tower-ready-cache/src/error.rs b/tower/src/ready_cache/error.rs similarity index 100% rename from tower-ready-cache/src/error.rs rename to tower/src/ready_cache/error.rs diff --git a/tower/src/ready_cache/mod.rs b/tower/src/ready_cache/mod.rs new file mode 100644 index 0000000..ebf85ab --- /dev/null +++ b/tower/src/ready_cache/mod.rs @@ -0,0 +1,6 @@ +//! A cache of services + +pub mod cache; +pub mod error; + +pub use self::cache::ReadyCache; diff --git a/tower-reconnect/src/future.rs b/tower/src/reconnect/future.rs similarity index 97% rename from tower-reconnect/src/future.rs rename to tower/src/reconnect/future.rs index e12a795..b1d2c74 100644 --- a/tower-reconnect/src/future.rs +++ b/tower/src/reconnect/future.rs @@ -1,4 +1,4 @@ -use crate::Error; +use super::Error; use pin_project::pin_project; use std::{ future::Future, diff --git a/tower-reconnect/src/lib.rs b/tower/src/reconnect/mod.rs similarity index 94% rename from tower-reconnect/src/lib.rs rename to tower/src/reconnect/mod.rs index 2717c54..2464ee4 100644 --- a/tower-reconnect/src/lib.rs +++ b/tower/src/reconnect/mod.rs @@ -1,20 +1,15 @@ -#![doc(html_root_url = "https://docs.rs/tower-reconnect/0.3.0")] -#![warn(missing_debug_implementations, rust_2018_idioms, unreachable_pub)] -#![allow(missing_docs)] // TODO -#![allow(elided_lifetimes_in_paths)] - pub mod future; -use crate::future::ResponseFuture; -use log::trace; +use self::future::ResponseFuture; +use crate::make::MakeService; use std::fmt; use std::{ future::Future, pin::Pin, task::{Context, Poll}, }; -use tower_make::MakeService; use tower_service::Service; +use tracing::trace; /// Reconnect to failed services. pub struct Reconnect diff --git a/tower-retry/src/budget.rs b/tower/src/retry/budget.rs similarity index 100% rename from tower-retry/src/budget.rs rename to tower/src/retry/budget.rs diff --git a/tower-retry/src/future.rs b/tower/src/retry/future.rs similarity index 99% rename from tower-retry/src/future.rs rename to tower/src/retry/future.rs index a60a85b..77377c5 100644 --- a/tower-retry/src/future.rs +++ b/tower/src/retry/future.rs @@ -1,6 +1,6 @@ //! Future types -use crate::{Policy, Retry}; +use super::{Policy, Retry}; use futures_core::ready; use pin_project::{pin_project, project}; use std::future::Future; diff --git a/tower-retry/src/layer.rs b/tower/src/retry/layer.rs similarity index 96% rename from tower-retry/src/layer.rs rename to tower/src/retry/layer.rs index eb9e2b5..a5be368 100644 --- a/tower-retry/src/layer.rs +++ b/tower/src/retry/layer.rs @@ -1,4 +1,4 @@ -use crate::Retry; +use super::Retry; use tower_layer::Layer; /// Retry requests based on a policy diff --git a/tower-retry/src/lib.rs b/tower/src/retry/mod.rs similarity index 82% rename from tower-retry/src/lib.rs rename to tower/src/retry/mod.rs index c35618e..e369dbb 100644 --- a/tower-retry/src/lib.rs +++ b/tower/src/retry/mod.rs @@ -1,12 +1,3 @@ -#![doc(html_root_url = "https://docs.rs/tower-retry/0.3.0")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] -#![allow(elided_lifetimes_in_paths)] - //! Tower middleware for retrying "failed" requests. pub mod budget; @@ -14,10 +5,10 @@ pub mod future; mod layer; mod policy; -pub use crate::layer::RetryLayer; -pub use crate::policy::Policy; +pub use self::layer::RetryLayer; +pub use self::policy::Policy; -use crate::future::ResponseFuture; +use self::future::ResponseFuture; use pin_project::pin_project; use std::task::{Context, Poll}; use tower_service::Service; diff --git a/tower-retry/src/never.rs b/tower/src/retry/never.rs similarity index 100% rename from tower-retry/src/never.rs rename to tower/src/retry/never.rs diff --git a/tower-retry/src/policy.rs b/tower/src/retry/policy.rs similarity index 100% rename from tower-retry/src/policy.rs rename to tower/src/retry/policy.rs diff --git a/tower-spawn-ready/src/future.rs b/tower/src/spawn_ready/future.rs similarity index 98% rename from tower-spawn-ready/src/future.rs rename to tower/src/spawn_ready/future.rs index 676058d..741792d 100644 --- a/tower-spawn-ready/src/future.rs +++ b/tower/src/spawn_ready/future.rs @@ -1,6 +1,6 @@ //! Background readiness types -use crate::Error; +use super::Error; use futures_core::ready; use pin_project::pin_project; use std::marker::PhantomData; diff --git a/tower-spawn-ready/src/layer.rs b/tower/src/spawn_ready/layer.rs similarity index 94% rename from tower-spawn-ready/src/layer.rs rename to tower/src/spawn_ready/layer.rs index ceddf9c..5e1185d 100644 --- a/tower-spawn-ready/src/layer.rs +++ b/tower/src/spawn_ready/layer.rs @@ -1,4 +1,4 @@ -use crate::MakeSpawnReady; +use super::MakeSpawnReady; use tower_layer::Layer; /// Spawns tasks to drive its inner service to readiness. diff --git a/tower-spawn-ready/src/make.rs b/tower/src/spawn_ready/make.rs similarity index 98% rename from tower-spawn-ready/src/make.rs rename to tower/src/spawn_ready/make.rs index 6e6f859..0a413ef 100644 --- a/tower-spawn-ready/src/make.rs +++ b/tower/src/spawn_ready/make.rs @@ -1,4 +1,4 @@ -use crate::SpawnReady; +use super::SpawnReady; use futures_core::ready; use pin_project::pin_project; use std::{ diff --git a/tower/src/spawn_ready/mod.rs b/tower/src/spawn_ready/mod.rs new file mode 100644 index 0000000..c005696 --- /dev/null +++ b/tower/src/spawn_ready/mod.rs @@ -0,0 +1,14 @@ +//! When an underlying service is not ready, drive it to readiness on a +//! background task. + +pub mod future; +mod layer; +mod make; +mod service; + +pub use self::layer::SpawnReadyLayer; +pub use self::make::{MakeFuture, MakeSpawnReady}; +pub use self::service::SpawnReady; + +/// Errors produced by `SpawnReady`. +pub(crate) type Error = Box; diff --git a/tower-spawn-ready/src/service.rs b/tower/src/spawn_ready/service.rs similarity index 97% rename from tower-spawn-ready/src/service.rs rename to tower/src/spawn_ready/service.rs index 63ac8c9..362069e 100644 --- a/tower-spawn-ready/src/service.rs +++ b/tower/src/spawn_ready/service.rs @@ -1,4 +1,4 @@ -use crate::{future::background_ready, Error}; +use super::{future::background_ready, Error}; use futures_core::ready; use futures_util::future::{MapErr, TryFutureExt}; use std::{ diff --git a/tower-timeout/src/error.rs b/tower/src/timeout/error.rs similarity index 100% rename from tower-timeout/src/error.rs rename to tower/src/timeout/error.rs diff --git a/tower-timeout/src/future.rs b/tower/src/timeout/future.rs similarity index 96% rename from tower-timeout/src/future.rs rename to tower/src/timeout/future.rs index fb86300..64200c8 100644 --- a/tower-timeout/src/future.rs +++ b/tower/src/timeout/future.rs @@ -1,6 +1,6 @@ //! Future types -use crate::error::{Elapsed, Error}; +use super::error::{Elapsed, Error}; use pin_project::pin_project; use std::{ future::Future, diff --git a/tower-timeout/src/layer.rs b/tower/src/timeout/layer.rs similarity index 96% rename from tower-timeout/src/layer.rs rename to tower/src/timeout/layer.rs index e165ce1..71970ec 100644 --- a/tower-timeout/src/layer.rs +++ b/tower/src/timeout/layer.rs @@ -1,4 +1,4 @@ -use crate::Timeout; +use super::Timeout; use std::time::Duration; use tower_layer::Layer; diff --git a/tower-timeout/src/lib.rs b/tower/src/timeout/mod.rs similarity index 83% rename from tower-timeout/src/lib.rs rename to tower/src/timeout/mod.rs index b5458f9..463755d 100644 --- a/tower-timeout/src/lib.rs +++ b/tower/src/timeout/mod.rs @@ -1,11 +1,3 @@ -#![doc(html_root_url = "https://docs.rs/tower-timeout/0.3.0")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] - //! Tower middleware that applies a timeout to requests. //! //! If the response does not complete within the specified timeout, the response @@ -15,9 +7,9 @@ pub mod error; pub mod future; mod layer; -pub use crate::layer::TimeoutLayer; +pub use self::layer::TimeoutLayer; -use crate::{error::Error, future::ResponseFuture}; +use self::{error::Error, future::ResponseFuture}; use std::task::{Context, Poll}; use std::time::Duration; use tower_service::Service; diff --git a/tower-timeout/src/never.rs b/tower/src/timeout/never.rs similarity index 100% rename from tower-timeout/src/never.rs rename to tower/src/timeout/never.rs diff --git a/tower/src/util.rs b/tower/src/util.rs deleted file mode 100644 index 87cf6c8..0000000 --- a/tower/src/util.rs +++ /dev/null @@ -1,6 +0,0 @@ -//! Combinators for working with `Service`s - -pub use tower_util::{ - BoxService, CallAll, CallAllUnordered, Either, Oneshot, Optional, Ready, ServiceExt, - UnsyncBoxService, -}; diff --git a/tower-util/src/boxed/mod.rs b/tower/src/util/boxed/mod.rs similarity index 100% rename from tower-util/src/boxed/mod.rs rename to tower/src/util/boxed/mod.rs diff --git a/tower-util/src/boxed/sync.rs b/tower/src/util/boxed/sync.rs similarity index 100% rename from tower-util/src/boxed/sync.rs rename to tower/src/util/boxed/sync.rs diff --git a/tower-util/src/boxed/unsync.rs b/tower/src/util/boxed/unsync.rs similarity index 100% rename from tower-util/src/boxed/unsync.rs rename to tower/src/util/boxed/unsync.rs diff --git a/tower-util/src/call_all/common.rs b/tower/src/util/call_all/common.rs similarity index 100% rename from tower-util/src/call_all/common.rs rename to tower/src/util/call_all/common.rs diff --git a/tower-util/src/call_all/mod.rs b/tower/src/util/call_all/mod.rs similarity index 100% rename from tower-util/src/call_all/mod.rs rename to tower/src/util/call_all/mod.rs diff --git a/tower-util/src/call_all/ordered.rs b/tower/src/util/call_all/ordered.rs similarity index 100% rename from tower-util/src/call_all/ordered.rs rename to tower/src/util/call_all/ordered.rs diff --git a/tower-util/src/call_all/unordered.rs b/tower/src/util/call_all/unordered.rs similarity index 100% rename from tower-util/src/call_all/unordered.rs rename to tower/src/util/call_all/unordered.rs diff --git a/tower-util/src/either.rs b/tower/src/util/either.rs similarity index 100% rename from tower-util/src/either.rs rename to tower/src/util/either.rs diff --git a/tower-util/src/lib.rs b/tower/src/util/mod.rs similarity index 83% rename from tower-util/src/lib.rs rename to tower/src/util/mod.rs index 30b505e..1527770 100644 --- a/tower-util/src/lib.rs +++ b/tower/src/util/mod.rs @@ -1,16 +1,6 @@ -#![doc(html_root_url = "https://docs.rs/tower-util/0.3.1")] -#![warn( - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - unreachable_pub -)] -#![allow(elided_lifetimes_in_paths)] - //! Various utility types and functions that are generally with Tower. mod boxed; -#[cfg(feature = "call-all")] mod call_all; mod either; mod oneshot; @@ -18,7 +8,7 @@ mod optional; mod ready; mod service_fn; -pub use crate::{ +pub use self::{ boxed::{BoxService, UnsyncBoxService}, either::Either, oneshot::Oneshot, @@ -27,8 +17,7 @@ pub use crate::{ service_fn::{service_fn, ServiceFn}, }; -#[cfg(feature = "call-all")] -pub use crate::call_all::{CallAll, CallAllUnordered}; +pub use self::call_all::{CallAll, CallAllUnordered}; #[doc(hidden)] pub type Error = Box; @@ -36,13 +25,13 @@ pub type Error = Box; pub mod error { //! Error types - pub use crate::optional::error as optional; + pub use super::optional::error as optional; } pub mod future { //! Future types - pub use crate::optional::future as optional; + pub use super::optional::future as optional; } /// An extension trait for `Service`s that provides a variety of convenient diff --git a/tower-util/src/oneshot.rs b/tower/src/util/oneshot.rs similarity index 100% rename from tower-util/src/oneshot.rs rename to tower/src/util/oneshot.rs diff --git a/tower-util/src/optional/error.rs b/tower/src/util/optional/error.rs similarity index 100% rename from tower-util/src/optional/error.rs rename to tower/src/util/optional/error.rs diff --git a/tower-util/src/optional/future.rs b/tower/src/util/optional/future.rs similarity index 100% rename from tower-util/src/optional/future.rs rename to tower/src/util/optional/future.rs diff --git a/tower-util/src/optional/mod.rs b/tower/src/util/optional/mod.rs similarity index 100% rename from tower-util/src/optional/mod.rs rename to tower/src/util/optional/mod.rs diff --git a/tower-util/src/ready.rs b/tower/src/util/ready.rs similarity index 100% rename from tower-util/src/ready.rs rename to tower/src/util/ready.rs diff --git a/tower-util/src/service_fn.rs b/tower/src/util/service_fn.rs similarity index 100% rename from tower-util/src/service_fn.rs rename to tower/src/util/service_fn.rs diff --git a/tower-balance/tests/p2c.rs b/tower/tests/balance/main.rs similarity index 100% rename from tower-balance/tests/p2c.rs rename to tower/tests/balance/main.rs diff --git a/tower-buffer/tests/buffer.rs b/tower/tests/buffer/main.rs similarity index 100% rename from tower-buffer/tests/buffer.rs rename to tower/tests/buffer/main.rs diff --git a/tower-filter/tests/filter.rs b/tower/tests/filter/main.rs similarity index 100% rename from tower-filter/tests/filter.rs rename to tower/tests/filter/main.rs diff --git a/tower-hedge/tests/hedge.rs b/tower/tests/hedge/main.rs similarity index 100% rename from tower-hedge/tests/hedge.rs rename to tower/tests/hedge/main.rs diff --git a/tower-limit/tests/concurrency.rs b/tower/tests/limit/concurrency.rs similarity index 100% rename from tower-limit/tests/concurrency.rs rename to tower/tests/limit/concurrency.rs diff --git a/tower/tests/limit/main.rs b/tower/tests/limit/main.rs new file mode 100644 index 0000000..fc4378f --- /dev/null +++ b/tower/tests/limit/main.rs @@ -0,0 +1,2 @@ +mod concurrency; +mod rate; diff --git a/tower-limit/tests/rate.rs b/tower/tests/limit/rate.rs similarity index 100% rename from tower-limit/tests/rate.rs rename to tower/tests/limit/rate.rs diff --git a/tower-load-shed/tests/load-shed.rs b/tower/tests/load_shed/main.rs similarity index 100% rename from tower-load-shed/tests/load-shed.rs rename to tower/tests/load_shed/main.rs diff --git a/tower-ready-cache/tests/ready_cache.rs b/tower/tests/ready_cache/main.rs similarity index 100% rename from tower-ready-cache/tests/ready_cache.rs rename to tower/tests/ready_cache/main.rs diff --git a/tower-retry/tests/retry.rs b/tower/tests/retry/main.rs similarity index 100% rename from tower-retry/tests/retry.rs rename to tower/tests/retry/main.rs diff --git a/tower-spawn-ready/tests/spawn_ready.rs b/tower/tests/spawn_ready/main.rs similarity index 100% rename from tower-spawn-ready/tests/spawn_ready.rs rename to tower/tests/spawn_ready/main.rs diff --git a/tower-util/tests/call_all.rs b/tower/tests/util/call_all.rs similarity index 100% rename from tower-util/tests/call_all.rs rename to tower/tests/util/call_all.rs diff --git a/tower/tests/util/main.rs b/tower/tests/util/main.rs new file mode 100644 index 0000000..cb80d97 --- /dev/null +++ b/tower/tests/util/main.rs @@ -0,0 +1,2 @@ +mod call_all; +mod service_fn; diff --git a/tower-util/tests/service_fn.rs b/tower/tests/util/service_fn.rs similarity index 100% rename from tower-util/tests/service_fn.rs rename to tower/tests/util/service_fn.rs