6 Commits

Author SHA1 Message Date
Carl Lerche
20fb04e3e9
in-flight-limit: Add missing task notification. (#85)
Previously, there was no notification when capacity is made available by
requests completing. This patch fixes the bug.

This also switches the tests to use `MockTask` from tokio-test.
2018-06-11 15:29:34 -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
Eliza Weisman
8acbfa80ee Nested errors no longer print "inner service error:" or similar (#56) 2018-02-27 15:36:44 -08:00
Eliza Weisman
cc99f32486
Implement std::error::Error for Tower error types (#51)
I've implemented `std::error::Error` for the error types in the `tower-balance`, `tower-buffer`, `tower-in-flight-limit`, and `tower-reconnect` middleware crates.

This is required upstream for runconduit/conduit#442, and also just generally seems like the right thing to do as a library.
2018-02-24 10:48:04 -08:00
Carl Lerche
41c54b208e
InFlightLimit middleware (#49)
Provides a middleware that sets a maximum number of requests that can be
in-flight for the service. A request is defined to be in-flight from the
time `call` is invoked to the time the returned response future
resolves.

This maximum is enforced across all clones of the service instance.
2018-02-20 11:04:03 -08:00