Commit Graph

33 Commits

Author SHA1 Message Date
Lucio Franco 86eef82d2f
Remove default features for futures dep (#399)
* Remove default features for futures dep

* Add missing alloc feature
2019-12-19 14:20:41 -05:00
Juan Alvarez 1843416dfe remove service, make and layer path deps (#382) 2019-12-06 11:59:56 -05:00
Lucio Franco e2f1a49cf3
Update the rest of the crates and upgrade ready cache to `std::f… (#379)
* Update hedge, filter, load, load-shed, and more

* Update ready cache

* Prepare release for ready-cache

* fix merge

* Update balance

* Prepare balance release
2019-12-05 14:21:47 -05:00
Jon Gjengset 2653f70884 Bumps for 0.3.0-alpha.2 (#355)
* Bump all to futures-* alpha.19

* Prepare for alpha.2 release

* Make tower-service also a path dep

* Use new tokio alpha
2019-09-30 18:56:26 -04:00
Taiki Endo 03dc7069aa Update pin-project to 0.4 (#350) 2019-09-30 14:58:27 -04:00
Jon Gjengset 6baf381879
Consistently apply deny/warn rules (#352)
This makes all tower subcrates have the following lints as warn (rather
than allow): `missing_docs`, `rust_2018_idioms`, `unreachable_pub`, and
`missing_debug_implementations`. In addition, it consistently applies
`deny(warning)` *only* under CI so that deprecations and macro changes in minor
version bumps in dependencies will never cause `tower` crates to stop
compiling, and so that tests can be run even if not all warnings have been
dealt with. See also https://github.com/rust-unofficial/patterns/blob/master/anti_patterns/deny-warnings.md

Note that `tower-reconnect` has the `missing_docs` lint disabled for now
since it contained _no_ documentation previously. Also note that this
patch does not add documentation to the various `new` methods, as they
are considered self-explanatory. They are instead marked as
`#[allow(missing_docs)]`.
2019-09-23 17:28:14 -04:00
Sean McArthur 52075f3c6f Update tower-make to tokio-io v0.2.0-alpha.5 2019-09-20 15:09:09 -07: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 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
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 07baf63048 Remove bounds of `Service` from `Layer` 2019-04-22 13:34:38 -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 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
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 acda5a75b9
Initial introduction of tower-service-util (#193) 2019-03-14 11:27:36 -07:00
Carl Lerche bdcce9677b
depend on tower-service from crates.io (#186) 2019-03-06 13:38:58 -08:00
Carl Lerche fb01af2ad9
filter: Update error style (#178)
This patch does not migrate tower-filter to use an error type of
Box<Error>. Instead, it defines a new type that optionally contains
a Box<Error>.

The filter layer can be used as part of routing. The router would
sequentially attempt to dispatch a request to an inner service. If
the request is rejected, it attempts the next one. In this case, allocating
a Box<Error> for each attempt is not great.

This strategy still fits within the greater picture. tower_filter::error::Error
implements the error trait, which means that all other layers that take
T: Into<Error> will still work with Filter. Also, only the immediate caller
of Filter should care about rejection errors. In which case, Filter will be
referenced explicitly.

Refs: #131
2019-03-01 15:25:21 -08:00
Carl Lerche bf8c3b885a
mock: Use Box<Error> instead of a generic (#177)
Refs: #131
2019-03-01 13:56:57 -08:00
Lucio Franco c5d70481bd
layer: Add `tower-layer` and the `Layer` trait (#163)
This change introduces the new `tower-layer` crate and the foundational `Layer` trait to go along with it. This trait allows one to easily compose a set of `Service`s that take an inner service. These services only modify the request/response. This also provides the `Layer` implementation for many of the tower crates.
2019-02-27 15:28:42 -05:00
Carl Lerche f42338934a
Require `poll_ready` to be called before `call` (#161)
This updates the `Service` contract requiring `poll_ready` to be called
before `call`. This allows `Service::call` to panic in the event the
user of the service omits `poll_ready` or does not wait until `Ready` is
observed.
2019-02-21 12:18:56 -08:00
David Barsky d7e1b8f5dd Format tower with rustfmt; check in CI (#157) 2019-02-11 15:11:31 -08:00
Sean McArthur ffa6f03618 tower-service v0.2.0 (#135) 2018-12-12 16:14:05 -05:00
Sean McArthur 787c10b7c4 move Service::ready() to ServiceExt::ready() (#128) 2018-11-27 12:25:59 -08:00
Carl Lerche 75eecc476c
Switch Service request to a generic. (#109)
This changes the Service request type to a generic instead of an associated
type. This is more appropriate as requests are inputs to the service.

This change enables a single implementation of `Service` to accept many
kinds of request types. This also enables requests to be references.

Fixes #99
2018-11-01 12:28:10 -07:00
Carl Lerche 5369879af6
Extract `Service` trait and related into crate. (#67)
This makes the `tower` crate available to be a "batteries included"
facade.
2018-04-25 12:35:52 -07:00
Carl Lerche ad6ff8c0d8 License Tower under MIT only
A dual MIT / Apache 2.0 license does not make any sense. Since the
intent of the original license was to be dual under MIT or Apache 2.0,
restricting to ony MIT is OK.
2017-11-16 09:44:44 -08:00
Carl Lerche 8d6daa45ea Prevent accidental publishing of the crates 2017-11-16 09:40:32 -08:00
Carl Lerche b45c7ee0d4 Add middleware 2017-10-03 10:03:14 -07:00