Commit Graph

46 Commits

Author SHA1 Message Date
Gabe Jackson b7faef31e9 docs: Minor typo + wording fixes (tower-util) (#309) 2019-08-19 10:13:56 -04:00
Sean McArthur b9c2fea0fc Greatly improve Debug output of ServiceBuilder (#280) 2019-05-09 08:44:40 -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
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 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
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
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
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 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 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
Carl Lerche 92f4a0cb72
Rename tower-util -> tower (#197) 2019-03-15 10:53:19 -07:00
Carl Lerche fd54e47b56
rm tower-util/src/service_fn.rs (#196) 2019-03-14 19:51:50 -07:00
Carl Lerche acda5a75b9
Initial introduction of tower-service-util (#193) 2019-03-14 11:27:36 -07:00
Jon Gjengset 421fbf0006 Add CallAll combinator. (#187)
Add the `CallAll` combinator, which provides:

```rust
Stream<Item = Request> + Service<Request> => Stream<Item = Response>
```

That is, given a `Stream` of requests and a `Service` that can accept
those requests, it produces a `Stream` of the corresponding responses.
2019-03-08 09:19:38 -08:00
Carl Lerche bdcce9677b
depend on tower-service from crates.io (#186) 2019-03-06 13:38:58 -08:00
Sean McArthur 0dc8281ef6
ext: add ServiceExt::oneshot to call the service when it is ready (#164) 2019-02-22 16:15:42 -08:00
Carl Lerche 25eb52153d
Remove DirectService (#160) 2019-02-16 10:21:59 -08:00
David Barsky d7e1b8f5dd Format tower with rustfmt; check in CI (#157) 2019-02-11 15:11:31 -08:00
Lucio Franco 61a183fe88 Add MakeConnection trait alias (#151) 2019-01-28 13:38:13 -08:00
Sean McArthur ffa6f03618 tower-service v0.2.0 (#135) 2018-12-12 16:14:05 -05:00
Sean McArthur ac1586748f move MakeService to tower-util 2018-11-27 12:37:20 -08:00
Sean McArthur 787c10b7c4 move Service::ready() to ServiceExt::ready() (#128) 2018-11-27 12:25:59 -08:00
Jon Gjengset 72508ff4ba Implement DirectService for ServiceFn (#127) 2018-11-27 11:02:49 -08:00
Sean McArthur 373d017e0f change NewService to MakeService<Target, Request> 2018-11-08 15:11: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
Nikolay Kim c29f7e97ba Add combinators for working with Services (#104) 2018-09-17 15:04:24 -07:00
Markus Jais 09c9419c46 fixed typos in comments (#89) 2018-07-11 15:04:15 -07:00
Carl Lerche 295ae583d4
Remove `ReadyService` (#68)
The value added by having a separate trait is not obvious. Equivalent
behavior can be provided by a `Service` implementation that is always
"ready".
2018-04-25 14:32:13 -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 942238237e
Move ReadyService to a dedicated crate. (#48)
This is the first step to resolve #44. The move will happen in two steps
to avoid breaking any libs depending on this now.
2018-02-19 11:53:29 -08:00
Carl Lerche da7a6a155c
Add ServiceFn to utils (#30) 2017-11-21 13:47:14 -08:00
Oliver Gould 2db5adee43 Derive Debug for all error types (#28) 2017-11-19 12:25:10 -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 947be7f9dd
Add `Boxed` helper for creating service objects (#24) 2017-10-27 14:06:51 -07:00
Carl Lerche cd20feb484 Misc small fixes (#23) 2017-10-26 14:04:59 -07:00
Carl Lerche 4cb50eef77 Add tower-util (#19)
* NewServiceFn
* OptionService
* EitherService
2017-10-21 14:06:39 -07:00