Commit Graph

335 Commits

Author SHA1 Message Date
Lucio Franco c40185901e
limit: Add date to changelog 2019-09-11 16:09:29 -04:00
Lucio Franco 589eb44377
util: Add date to changelog 2019-09-11 16:02:34 -04:00
Lucio Franco a3c16e85f9
make: Add changelog date 2019-09-11 15:59:30 -04:00
Lucio Franco a8def9349f
reconnect: Remove publish false 2019-09-11 15:58:43 -04:00
Lucio Franco 90ef2a64b4
reconnect: Add date to changelog 2019-09-11 15:57:55 -04:00
Lucio Franco 04fd0c5898
Merge branch 'v0.3.x' of github.com:tower-rs/tower into v0.3.x 2019-09-11 15:57:32 -04:00
Jon Gjengset 395889c763
Make Ready only take Service by reference (#340)
Rather than consuming `self` and returning `(Self, _)`. This did mean
that a few crates that depended on `Ready` to own the `Service` and
provide it once it was ready had to change to call `poll_ready`
directly. Which in turn meant adding in some PhantomData<Request> so
that the impl blocks wouldn't be under-constrainted. Take, for example:

```
impl<K, S: Service<Req>, Req> Future for UnreadyService<K, S>
```

would fail to compile with

```
error[E0207]: the type parameter `Req` is not constrained by the impl trait, self type, or predicates
```
2019-09-11 15:49:51 -04:00
Lucio Franco 6c68c56dc4
retry: Update changelog with date 2019-09-11 15:12:33 -04:00
Lucio Franco 9b8db5b393
test: Add changelog entry and date 2019-09-11 15:08:20 -04:00
Lucio Franco 97a2bc18b9
timeout: Update changelog release date 2019-09-11 15:00:42 -04:00
Lucio Franco 83752ab6c2
layer: Add date to changelog 2019-09-11 14:49:23 -04:00
Jon Gjengset 3d642f5ca0
This bumps tower-hedge to 0.3.0-alpha.1 (#334) 2019-09-11 14:00:22 -04:00
Lucio Franco fb124a14f0
Pin all the alpha based dependencies (#339)
Signed-off-by: Lucio Franco <luciofranco14@gmail.com>
2019-09-11 13:57:27 -04:00
Taiki Endo 921325ac2d Pin the version of pin-project 2019-09-11 10:00:27 -07:00
Taiki Endo 65e07064db Update pin-project to 0.4.0-alpha.11 2019-09-11 10:00:27 -07:00
Jon Gjengset d333e9f32f
spawn-ready: fix tests after removal of E (#337) 2019-09-11 11:09:17 -04:00
Jon Gjengset 4c1df65a75
cargo fmt 2019-09-11 10:30:41 -04:00
Jon Gjengset 87976ae418
Update tower-balance to std::future (#335)
This bumps tower-balance to 0.3.0-alpha.1

It also adds delegate impls for `Discover` through `Pin`, and makes `tower-load::Constant: Debug`.
2019-09-10 18:15:32 -04:00
Jon Gjengset 1ca999fde1
Update tower-spawn-ready to std::future (#332)
This bumps tower-spawn-ready to 0.3.0-alpha.1
2019-09-10 17:06:34 -04:00
Jon Gjengset 0802ca2bce
Update tower-util and tower to std::future (#330)
This bumps tower-util and tower to 0.3.0-alpha.1
2019-09-10 14:51:07 -04:00
Jon Gjengset 9691d0d379
Update tower-reconnect to std::future (#333)
This bumps tower-reconnect to 0.3.0-alpha.1

It also makes the tower-make version consistent
2019-09-10 11:48:01 -04:00
Jon Gjengset adca66cf74
Update tower-filter to std::future (#331)
This bumps tower-filter to 0.3.0-alpha.1
2019-09-10 11:39:51 -04:00
Jon Gjengset eac0ea30c3
Use the same version of pin-project everywhere (#329) 2019-09-09 16:31:40 -04:00
Jon Gjengset 4eb47b01dc
Update tower-timeout to std::future (#328)
This bumps tower-timeout to 0.3.0-alpha.1
2019-09-09 16:20:09 -04:00
Jon Gjengset 233aab1988
Obviate need for as_mut to assert_request_eq (#327)
Calling a method on `Pin<&mut Self>` moves the pin, which means you can't call more methods later. The solution to this is to use `Pin::as_mut`. But it's annoying to have to do that to _every_ call to the `assert_request_eq!` helper macro from `tower-test`, so I made it do it for me.
2019-09-09 15:28:41 -04:00
Jon Gjengset 4f71951221
Update tower-retry to std::future (#326)
This bumps tower-retry to 0.3.0-alpha.1
2019-09-09 15:10:46 -04:00
Jon Gjengset 154bd69b9f
Update tower-limit to std::future (#324)
This bumps tower-limit to 0.3.0-alpha.1
2019-09-09 12:09:41 -04:00
Jon Gjengset 390e124525
Update tower-load-shed to std::future (#325)
This bumps tower-load-shed to 0.3.0-alpha.1
2019-09-09 12:09:19 -04:00
Jon Gjengset 693965fa4a
Update tower-buffer to std::future (#323)
This bumps tower-buffer to 0.3.0-alpha.1
2019-09-09 12:07:28 -04:00
Jon Gjengset f8097a60f6
Update tower-load to std::future (#321)
This bumps tower-load to 0.3.0-alpha.1
2019-09-09 09:22:49 -04:00
Jon Gjengset db116d1937
Update tower-layer to std::future (#322)
This bumps tower-layer to 0.3.0-alpha.1
2019-09-07 00:22:18 -04:00
Jon Gjengset 5ad02b73d9
Update tower-discover to std::future (#320)
This bumps tower-discover to 0.3.0-alpha.1
2019-09-07 00:20:21 -04:00
John Doneth 7ae5967e7a Update tower-test to std::future::Future (#316)
* update tower-test to std::future

* refactoring tower-test tests

* everything works

* whoops, un-delete the tower dir

* cleanup & update links

* undo changes to tower-filter for this PR

* use pin_utils::unsafe_pinned

* use tokio-test
2019-09-03 10:26:46 -04:00
Stan Bondi ae611db665 Update `service_fn` to `std::future::Future` (#318)
This small PR ports service_fn to `std::future`.
2019-09-03 10:12:33 -04:00
Lucio Franco 84da777ad1
Update tokio-io and prep release (#314)
* Bump tokio-io to alpha.4

* Prep tower-make release alpha.2
2019-08-30 11:01:19 -04:00
Lucio Franco 6cb9c1099e
make: More release clean up 2019-08-27 12:44:13 -04:00
Lucio Franco 652137aaa3
Update MakeService and MakeConnection (#313)
* Update MakeService and MakeConnection

* Create tower-make crate

* Remove Makers from tower-util
2019-08-27 12:39:14 -04:00
Lucio Franco 793e2e8e94
Add a note about v0.3.x branch to the readme (#312)
* Add a note about v0.3.x branch to the readme

Signed-off-by: Lucio Franco <luciofranco14@gmail.com>

* Fix link

Signed-off-by: Lucio Franco <luciofranco14@gmail.com>
2019-08-20 23:20:01 -04:00
Lucio Franco 1351aaa9d8
service: Add changelog entry for 0.3.0-alpha.1 2019-08-20 14:34:30 -04:00
Lucio Franco fe9cef6006
Update `tower-service` to `std::future::Future` (#311) 2019-08-20 14:31:09 -04:00
Gabe Jackson b7faef31e9 docs: Minor typo + wording fixes (tower-util) (#309) 2019-08-19 10:13:56 -04:00
Gabe Jackson 168539ed9e docs: Minor typo + wording fixes (#310) 2019-08-17 17:10:17 -04:00
Lucio Franco 26d096bd99
timeout: Add `Elapsed::new` and prepare 0.1.1 release (#308)
* Add Elapsed::new

* Prep tower-timeout 0.1.1 release
2019-07-30 15:14:24 -04:00
Lucio Franco 72219ce862
Prep buffer and tower release (#305)
* Prep buffer 0.1.1 release

* Prep release for tower 0.1.1
2019-07-19 14:21:07 -04:00
Jon Gjengset 40fbb85c4b
Notify Pool when Services are dropped (#301)
Prior to this change, when `Balance` dropped a failing service, `Pool`
would not be notified of this fact. This meant that it never updated
`.services`, and so it might not add a new backing `Service` (e.g., due
to `max_services`) even though no working backing exist.

With this change, dropped services notify the `Pool` so that it knows to
re-check its limits. It also gains some much-needed tests.
2019-07-15 13:50:01 -04:00
Jon Gjengset 491dfbe634
Early push to bring tracing into tower (#298)
Of particular note is that this change lets spans trace requests through `tower::Buffer` by internally carrying the `Span` at the time of `call` along with the request to the worker.
2019-07-12 14:46:50 -04:00
Oliver Gould b39a4881d8
builder: Add `into_inner` (#299)
When using a `ServiceBuilder`, it's not possible to obtain the
underlying `Layer` implementation.

Adding a `ServiceBuilder::into_inner` allows callers to retrieve this
field instead of only being able to build a `Service`.
2019-07-09 11:43:59 -07:00
Oliver Gould 18b30eb70e
balance: Only balance over ready endpoints (#293)
In 03ec4aa, the balancer was changed to make a quick endpoint decision.
This, however, means that the balancer can return NotReady when it does
in fact have a ready endpoint.

This changes the balancer to separate unready endpoints, only
performing p2c over ready endpoints. Unready endpoints are tracked with
a FuturesUnordered that supports eviction via oneshots.

The main downside of this change is that the Balancer must become
generic over the Request type.
2019-07-05 20:46:33 -07:00
Jon Gjengset 67a11f27ff
Fix some simple compile-time warnings (#297) 2019-07-05 17:10:11 -04:00
Oliver Gould 03ec4aafa8
balance: Specialize the balancer for P2C (#288)
As described in #286, `Balance` had a few problems:
- it is responsible for driving all inner services to readiness, making
  its `poll_ready` O(n) and not O(1);
- the `choose` abstraction was a hinderance. If a round-robin balancer
  is needed it can be implemented separately without much duplicate
  code; and
- endpoint errors were considered fatal to the balancer.

This changes replaces `Balance` with `p2c::Balance` and removes the
`choose` module.

Endpoint service failures now cause the service to be removed from the
balancer gracefully.

Endpoint selection is now effectively constant time, though it biases
for availability in the case when random selection does not yield an
available endpoint.

`tower-test` had to be updated so that a mocked service could fail after
advertising readiness.
2019-06-04 13:59:47 -07:00