Commit Graph

388 Commits

Author SHA1 Message Date
Carl Lerche dffa59d90f Rename `NewService::Instance` -> `Service`
Closes #10
Related: #9
2017-10-03 10:08:05 -07:00
Carl Lerche b45c7ee0d4 Add middleware 2017-10-03 10:03:14 -07:00
Carl Lerche 29fe8a85bd Cleanup CI configs 2017-10-03 09:42:53 -07:00
Carl Lerche bacb7dbfd2 Add backpresure capabilities to `Service` (#6)
Currently, `Service` does not provide a mechanism by which it can signal
to the caller that it is at capacity. This commit adds a `poll_ready`
function to the `Service` trait. Callers are able to first check
`poll_ready` before calling `Service::call`.

`poll_ready` is expected to be a hint and will be implemented in a best
effort fashion. It is permitted for a `Service` to return `Ready` from
`poll_ready` and the next invocation of `Service::call` fails.
2017-09-27 10:40:02 -07:00
Carl Lerche 3a0212d460 NewService is generic over error (#5)
Previously, NewService required returning a future yielding io::Error as
the error. This is not needed and is restrictive.
2017-09-21 16:50:28 -07:00
Eliza Weisman 270ef5a2bd s/tokio/tower (#7) 2017-09-18 12:05:09 -07:00
Carl Lerche d5f253c577 Rename to Tower 2017-07-25 10:42:33 -07:00
boats 56b9d42069 NewService returns a Future. (#1)
Service factories which perform IO while constructing a future (such as clients to network services) need to be asynchronous.
2017-07-25 10:36:20 -07:00
wangcong c56afde938 doc rewording (#23) 2017-05-22 11:40:38 -07:00
Alex Crichton aa858d9418 Use appveyor to download rustup 2017-03-27 06:48:47 -07:00
Alex Crichton 6c5de5610f Update docs links and such 2017-01-11 09:20:40 -08:00
Aaron Turon a303a2e177 Fix docs 2017-01-09 16:56:56 -08:00
Aaron Turon 41b0d0da8d Revert "Service::call takes &mut self"
This reverts commit dd51328a18.
2017-01-09 13:47:21 -08:00
Alex Crichton 0c904c40bb Merge pull request #16 from critiqjo/doc-fix
Fix names in examples (docs)
2016-12-31 16:36:12 -08:00
critiqjo 88c535b708 Fix names in examples 2017-01-01 02:19:01 +05:30
Aaron Turon 7ef3f1f70f Merge pull request #13 from tokio-rs/self-mut
Service::call takes &mut self
2016-12-22 09:00:26 -08:00
Carl Lerche dd51328a18 Service::call takes &mut self 2016-12-21 14:45:19 -08:00
Alex Crichton 4d1c02566a Depend on futures from crates.io 2016-11-23 08:34:19 -08:00
Alex Crichton 5bf1d7f2fa Update travis token 2016-11-19 09:35:35 -08:00
Alex Crichton a3776005c3 Depend on futures from git 2016-11-08 18:59:00 -08:00
Alex Crichton da47a933d0 Remove unused imports 2016-11-08 15:46:57 -08:00
Alex Crichton cbf48a2b8f Remove FnService for now
Seems like it may not show up that often in practice, so let's cut down on scope
and concepts.
2016-11-08 15:45:39 -08:00
Alex Crichton 88962e3d2f Tidy up some impls of Service/NewService
* Blanket impl of NewService for closures
* Blanket impl of NewService for Arc/Rc
* Blanket impl of Service for Box/Arc/Rc service (object safe too)
* Remove `Send + 'static` on `FnService`
* Remove inner `Arc` in `FnService`
2016-11-08 14:57:57 -08:00
Alex Crichton 5a7be1045e Merge pull request #6 from aturon/cleanup-for-0.1
Finalize tokio-service APIs for 0.1
2016-11-08 15:42:05 -07:00
Aaron Turon 5b63058129 Finalize tokio-service APIs for 0.1
A bit of tidying up ahead of the 0.1 release:

- Drop `poll_ready` for now, given that we're uncertain about the
  overall backpressure story, and it can be added easily as a defaulted
  method later on. Backpressure should be a major goal in an upcoming
  release.

- Rename `SimpleService` to `FnService`, matching the `Fn*` traits.

- Rename `NewService::Item` to `NewService::Instance`, for greater
  clarity about their relationship.
2016-11-08 14:19:53 -08:00
Alex Crichton 92eccdc149 pass --target on appveyor 2016-10-10 16:43:11 -07:00
Alex Crichton 02d27ca62a Merge pull request #3 from simkha/master
fix small typos in docs
2016-10-09 10:08:13 -07:00
Simkha cf88539fe9 fix typos in docs 2016-10-09 20:08:24 +06:00
Carl Lerche 6d7cf21c02 Impl Service for Service trait object 2016-10-02 13:34:49 -07:00
Alex Crichton 4dfeaba1f5 Merge pull request #2 from steveklabnik/patch-1
Fix small typo
2016-09-13 14:40:33 -07:00
Steve Klabnik f320f45aa1 Fix small typo 2016-09-13 17:39:58 -04:00
Carl Lerche 4d56c91fc6 Merge pull request #1 from kristoff3r/master
Set futures version number to match the other repos
2016-09-09 20:19:52 -07:00
Kristoffer Søholm 636bf12fe8 Set futures version number to match the other repos 2016-09-09 20:09:19 -07:00
Carl Lerche 72e13c5154 Move in NewService 2016-09-08 22:43:52 -07:00
Carl Lerche 2bfa5ced0f Tweaks to the Service trait
Full names are more idiomatic
2016-09-08 15:19:43 -07:00
Carl Lerche 7fecfb4ce6 Remove Send + 'static bound 2016-09-03 23:44:03 -07:00
Alex Crichton 821739abb9 Add a README 2016-08-26 16:27:58 -07:00
Alex Crichton 6faead4e63 Initial commit 2016-08-26 16:26:03 -07:00