Commit Graph

18 Commits

Author SHA1 Message Date
Lucio Franco 476f085c89
Introduce the `ServiceBuilder` (#175)
The `ServiceBuilder` composes layers together and produces either a `MakeService` or a `Service` wrapped by those layers.
2019-03-26 10:14:42 -04:00
Carl Lerche 50fc5e8e63
Reorganize tower-timeout (#191)
- Change error bound: `Error: From<S::Error>` (for `?` operator)
- Split types into dedicated files
- Move `ResponseFuture` into public `future` mod.
2019-03-11 16:10:51 -07:00
Carl Lerche bdcce9677b
depend on tower-service from crates.io (#186) 2019-03-06 13:38:58 -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
Sean McArthur 79a98ea05d timeout: update to Box<dyn Error> (#170) 2019-02-27 10:35:25 -08:00
Lucio Franco d874c251ff
timeout: Add derive Clone for the timeout service (#169) 2019-02-27 11:57:56 -05:00
David Barsky d7e1b8f5dd Format tower with rustfmt; check in CI (#157) 2019-02-11 15:11:31 -08:00
David Barsky 68d3f6c22e
Use `tokio::timer` instead of `tokio_timer`; use Kind pattern (#141) 2019-01-15 15:05:14 -05:00
Sean McArthur ffa6f03618 tower-service v0.2.0 (#135) 2018-12-12 16:14:05 -05: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
Eliza Weisman 4ffe24f485 Update tower-timeout to use new tokio-timer (#101) 2018-09-03 11:03:00 -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
Eliza Weisman 7b6cd0355d Normalize naming scheme (#62) 2018-03-06 11:41:52 -08:00
Eliza Weisman 8acbfa80ee Nested errors no longer print "inner service error:" or similar (#56) 2018-02-27 15:36:44 -08:00
Eliza Weisman 59679934c9 Add Error impls for tower-rate-limit and tower-timeout as well (#54) 2018-02-26 09:12:46 -08: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