Commit Graph

379 Commits

Author SHA1 Message Date
Sean McArthur b9c2fea0fc Greatly improve Debug output of ServiceBuilder (#280) 2019-05-09 08:44:40 -07:00
Marcus Griep 4d6d2c8572 Minor docs fix (#277) 2019-04-29 13:50:47 -07:00
Carl Lerche 8a646dd25c
ci: fix isRelease condition (#274) 2019-04-27 09:32:40 -07:00
Alex Leong 73c74252e6 Add hedge retry middleware (#236)
Add tower-hedge, a layer that preemptively retries requests which have been
outstanding for longer than a given latency percentile.  If either of the original
future or the retry future completes, that value is used.  For more information
about hedge requests, see: [The Tail at Scale][1]

[1]: https://cseweb.ucsd.edu/~gmporter/classes/fa17/cse124/post/schedule/p74-dean.pdf

Signed-off-by: Alex Leong <alex@buoyant.io>
2019-04-27 09:32:26 -07:00
Carl Lerche 716bafd922
chore: fix small errors in Cargo files 2019-04-26 22:31:07 -07:00
Carl Lerche 14f4259518
Prepare release (#273)
The following crates are to be released:

- tower
- tower-buffer
- tower-discover
- tower-layer
- tower-limit
- tower-load-shed
- tower-retry
- tower-service
- tower-test
- tower-timeout
- tower-util
2019-04-26 21:31:25 -07:00
Carl Lerche a4c753bda6
retry: organize crate (#270)
This follows the idioms used by the other crates.
2019-04-24 15:24:39 -07:00
Carl Lerche 92a981f8d6
ensure `ResponseFuture` types are in `futures` mod (#269)
Follow the pattern used in the other crates.
2019-04-24 15:01:00 -07:00
Sean McArthur d0d6ed54cf unify/improve style of docs shown by facade 2019-04-23 14:08:51 -07:00
Sean McArthur 0cc6cc0c78 inline docs for re-exported crates in facade (#266) 2019-04-23 12:46:02 -07:00
Carl Lerche 4cb450fa1d
limit: rate::error should be private (#265) 2019-04-23 12:45:34 -07:00
Sean McArthur 484cbe7556 Remove `ServiceBuilder::make_service()` 2019-04-23 12:08:21 -07:00
Carl Lerche 91c8357db1
Remove tower/examples (#261)
The examples create a cyclical dependency between this repository and
tower-hyper. Examples are moved to https://github.com/tower-rs/examples.
2019-04-23 11:47:57 -07:00
Sean McArthur c339f4bf13 Remove reconnect from tower facade 2019-04-23 11:28:56 -07:00
Sean McArthur 57a866ee09 remove Service bounds on ServiceBuilder::service() 2019-04-22 13:34:38 -07:00
Sean McArthur 27acbe600b impl Clone for Stack 2019-04-22 13:34:38 -07:00
Sean McArthur 5ec2979e83 impl Clone and Debug for Either 2019-04-22 13:34:38 -07:00
Carl Lerche 07baf63048 Remove bounds of `Service` from `Layer` 2019-04-22 13:34:38 -07:00
Sean McArthur d8e6d6499b
buffer: make Buffer::new infallible (#257)
Creating a buffer can internally fail to spawn a worker. Before, that
error was returned immediately from `Buffer::new`. This changes `new` to
always return a `Buffer`, and the spawn error is encountered via
`poll_ready`.
2019-04-22 13:06:20 -07:00
João Oliveira cc58745952 update doc examples (#259) 2019-04-22 10:55:14 -07:00
Alex Leong e15d49903a
Pin tower-hyper dep to a specific revision (#258)
Signed-off-by: Alex Leong <alex@buoyant.io>
2019-04-19 15:48:31 -07:00
Sean McArthur 979c139912 MakeConnection: rename Request generic to Target (#250) 2019-04-10 15:11:11 -07:00
Sean McArthur 2a3a577929 change ServiceFn to use FnMut instead of Fn (#249) 2019-04-10 13:37:00 -07:00
Sean McArthur d1c891d1ba
Promote service_fn to tower crate (#248) 2019-04-10 13:17:16 -07:00
Lucio Franco 23ce9133b5 buffer: Move buffer to service.rs and layer to layer.rs (#246) 2019-04-10 12:35:05 -07:00
Sean McArthur 1012b20737
util: derive Clone for ServiceFn (#245) 2019-04-10 12:02:15 -07:00
Carl Lerche 0f58e50c3d
Rename `Chain` -> `Stack` (#239)
Reduce metaphors.

Fixes #233
2019-04-09 13:09:44 -07:00
Jake Shadle b42a365828 Add license field to all crates (#241) 2019-04-09 10:59:30 -07:00
David Barsky 17860191d7 Move Tower to 2018 Edition (#238) 2019-04-08 20:11:09 -07:00
Carl Lerche 7769590f46
Remove balance and filter from tower (#240)
These two crates will need to be finished at a later time.
2019-04-08 14:49:24 -07:00
Carl Lerche ef6d203b47
Create `tower-test` and include tower-mock. (#237)
tower-mock is deleted in favor of having a single test crate. This crate
also includes a new macro: `assert_request_eq!`.
2019-04-07 20:42:18 -07:00
Carl Lerche 16f2d2b4fa
Consolidate `limit` layers (#235)
* Consolidate `limit` layers

- `InFlightLimit` and `RateLimit` are moved into `tower-limit` crate.
- `InFlightLimit` is renamed to `ConcurrencyLimit`.

Fixes #225
2019-04-05 20:08:43 -07:00
Carl Lerche 5ed014fc37
ci: include missing crates in CI run (#231) 2019-04-04 12:37:07 -07:00
Carl Lerche 971bb06152
Provide layer specific fns on `ServiceBuilder` (#227) 2019-04-03 20:40:06 -07:00
Oliver Gould aa8d024fc9
Support weighted balancing (#221)
In order to implement red-line testing, blue-green deployments, and
other operational use cases, many service discovery and routing schemes
support endpoint weighting.

In this iteration, we provide a decorator type, `WeightedLoad`, that may
be used to wrap load-bearing services to alter their load according to a
weight.  The `WithWeighted` type may also be used to wrap `Discover`
implementations, in which case it will wrap all new services with
`WeightedLoad`.
2019-04-03 19:59:46 -07:00
Carl Lerche 298fe2cc12
Rename `ServiceBuilder` builder fns. (#228)
Closes #226
2019-04-03 19:33:28 -07:00
Lucio Franco 486c533989
tower: Reexport all layers and add layer::util mod (#224)
* tower: Reexport all layers and add layer::util mod

* Fix crate names and layerext
2019-04-03 12:12:11 -04:00
Carl Lerche 9983347392
re-export layers from `tower` crate. (#222) 2019-04-02 16:22:23 -07:00
Lucio Franco 1fb42357f9
retry: Call poll_ready on the inner service (#223)
mock: Panic if poll_ready is not called
2019-04-02 17:53:24 -04:00
Carl Lerche d7516c3222
balance: minor cleanup (#220) 2019-03-29 19:17:21 -07:00
Carl Lerche 83be955afe
Rename OptionService -> Optional (#219)
Other service implementations do not have the Service suffix.
2019-03-29 19:17:11 -07:00
Carl Lerche 117018f319
Rename `EitherService` -> `Either` (#218) 2019-03-29 19:17:02 -07:00
Carl Lerche 3fd5b581cc
Fix build. (#217)
A recently merged PR failed to track master.
2019-03-29 14:39:34 -07:00
Carl Lerche 019129829c
Move layer::{LayerExt, Chain, Identity} (#216)
- `tower-layer` util types are now in `tower-util`.
- `LayerExt` is now in `tower`.

This sets the stage for adding layer specific extension fns.
2019-03-29 14:28:06 -07:00
Carl Lerche 2448ca9cdc
balance: cleanup example (#211) 2019-03-29 14:24:43 -07:00
Lucio Franco da4e22c89d
Add missing `TimeoutLayer` to tower (#215)
Signed-off-by: Lucio Franco <luciofranco14@gmail.com>
2019-03-29 17:00:13 -04:00
Carl Lerche f6dcbb6ca1
Remove combinators (#214) 2019-03-27 20:16:07 -07:00
Carl Lerche 3a407c2775
Move misc types (#213) 2019-03-27 19:56:44 -07:00
Carl Lerche f1bb22a296
util: rename tower-service-util -> tower-util (#212) 2019-03-27 16:34:56 -07:00
Lucio Franco d968432183 Export all crates from the tower crate (#210) 2019-03-27 15:38:49 -07:00