19 KiB
19 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.5.3
Added
- builder: Add
ServiceBuilder::boxed_clone_sync()helper (#804)
Fixed
- retry: Check that supplied jitter is not NaN (#843)
0.5.2
Added
- util: Add
BoxCloneSyncServicewhich is aClone + Send + SyncboxedService(#777) - util: Add
BoxCloneSyncServiceLayerwhich is aClone + Send + SyncboxedLayer([802])
0.5.1
Fixed
- Fix minimum version of
tower-layerdependency (#787)
0.5.0
Fixed
- util:
BoxServiceis nowSync(#702)
Changed
- util: Removed deprecated
ServiceExt::ready_andmethod andReadyAndfuture (#652) - retry: Breaking Change
retry::Policy::retrynow accepts&mut Reqand&mut Resinstead of the previous mutable versions. This increases the flexibility of the retry policy. To update, update your method signature to includemutfor both parameters. (#584) - retry: Breaking Change Change Policy to accept &mut self (#681)
- retry: Add generic backoff utilities (#685)
- retry: Breaking Change
Budgetis now a trait. This allows end-users to implement their own budget and bucket implementations. (#703) - reconnect: Breaking Change Remove unused generic parameter from
Reconnect::new(#755) - ready-cache: Allow iteration over ready services (#700)
- discover: Implement
Clonefor Change (#701) - util: Add a BoxCloneServiceLayer (#708)
- rng: use a simpler random 2-sampler (#716)
- filter: Derive
CloneforAsyncFilterLayer(#731) - general: Update IndexMap (#741)
- MSRV: Increase MSRV to 1.63.0 (#741)
- util: Breaking Change
Either::AandEither::Bhave been renamedEither::LeftandEither::Right, respectively. (#637) - util: Breaking Change
Eithernow requires its two services to have the same error type. (#637) - util: Breaking Change
Eitherno longer implemenmtsFuture. (#637) - buffer: Breaking Change
Buffer<S, Request>is now generic overBuffer<Request, S::Future>.(#654) - buffer: Breaking Change
Buffer's capacity now correctly matches the specified size. Previously, the capacity was subtly off-by-one, because a slot was held even while the worker task was processing a message. (#635)
0.4.12 (February 16, 2022)
Fixed
- hedge, load, retry: Fix use of
Instantoperations that can panic on platforms whereInstantis not monotonic (#633) - Disable
attributesfeature ontracingdependency (#623) - Remove unused dependencies and dependency features with some feature combinations (#603, #602)
- docs: Fix a typo in the RustDoc for
Buffer(#622)
Changed
- Updated minimum supported Rust version (MSRV) to 1.49.0.
- hedge: Updated
hdrhistogramdependency to v7.0 (#602) - Updated
tokio-utildependency to v0.7 (#638)
0.4.11 (November 18, 2021)
Added
- util: Add
BoxCloneServicewhich is aClone + SendboxedService(#615) - util: Add
ServiceExt::boxedandServiceExt::boxed_clonefor applying theBoxServiceandBoxCloneServicemiddleware (#616) - builder: Add
ServiceBuilder::boxedandServiceBuilder::boxed_clonefor applyingBoxServiceandBoxCloneServicelayers (#616)
Fixed
- util: Remove redundant
F: Clonebound fromServiceExt::map_request(#607) - util: Remove unnecessary
Debugbounds fromimpl Debug for BoxService(#617) - util: Remove unnecessary
Debugbounds fromimpl Debug for UnsyncBoxService(#617) - balance: Remove redundant
Req: Clonebound fromCloneimpls forMakeBalance, andMakeBalanceLayer(#607) - balance: Remove redundant
Req: Debugbound fromDebugimpls forMakeBalance,MakeFuture,Balance, andPool(#607) - ready-cache: Remove redundant
Req: Debugbound fromDebugimpl forReadyCache(#607) - steer: Remove redundant
Req: Debugbound fromDebugimpl forSteer(#607) - docs: Fix
doc(cfg(...))attributes ofPeakEwmaDiscover, andPendingRequestsDiscover(#610)
0.4.10 (October 19, 2021)
- Fix accidental breaking change when using the
rustdoc::broken_intra_doc_linkslint (#605) - Clarify that tower's minimum supported rust version is 1.46 (#605)
0.4.9 (October 13, 2021)
- Migrate to pin-project-lite (#595)
- builder: Implement
LayerforServiceBuilder(#600) - builder: Add
ServiceBuilder::and_thenanalogous toServiceExt::and_then(#601)
0.4.8 (May 28, 2021)
- builder: Add
ServiceBuilder::map_resultanalogous toServiceExt::map_result(#583) - limit: Add
GlobalConcurrencyLimitLayerto allow reusing a concurrency limit across multiple services (#574)
0.4.7 (April 27, 2021)
Added
- builder: Add
ServiceBuilder::check_serviceto check the request, response, and error types of the output service. (#576) - builder: Add
ServiceBuilder::check_service_cloneto check the output service can be cloned. (#576)
Fixed
- spawn_ready: Abort spawned background tasks when the
SpawnReadyservice is dropped, fixing a potential task/resource leak (#[581]) - Fixed broken documentation links (#578)
0.4.6 (February 26, 2021)
Deprecated
- util: Deprecated
ServiceExt::ready_and(renamed toServiceExt::ready). (#567) - util: Deprecated
ReadyAndfuture (renamed toReady). (#567)
Added
- builder: Add
ServiceBuilder::layer_fnto add a layer built from a function. (#560) - builder: Add
ServiceBuilder::map_futurefor transforming the futures produced by a service. (#559) - builder: Add
ServiceBuilder::service_fnfor applyingLayers to an async function usingutil::service_fn. (#564) - util: Add example for
service_fn. (#563) - util: Add
BoxLayerfor creating boxedLayertrait objects. (#569)
0.4.5 (February 10, 2021)
Added
- util: Add
ServiceExt::map_future. (#542) - builder: Add
ServiceBuilder::option_layerto optionally add a layer. (#555) - make: Add
Sharedwhich lets you implementMakeServiceby cloning a service. (#533)
Fixed
- util: Make combinators that contain closures implement
Debug. They previously wouldn't since closures never implementDebug. (#552) - steer: Implement
CloneforSteer. (#554) - spawn-ready: SpawnReady now propagates the current
tracingspan to spawned tasks (#557) - Only pull in
tracingfor the features that need it. (#551)
0.4.4 (January 20, 2021)
Added
- util: Implement
LayerforEither<A, B>. (#531) - util: Implement
CloneforFilterLayer. (#535) - timeout: Implement
CloneforTimeoutLayer. (#535) - limit: Implement
CloneforRateLimitLayer. (#535)
Fixed
- Added "full" feature which turns on all other features. (#532)
- spawn-ready: Avoid oneshot allocations. (#538)
0.4.3 (January 13, 2021)
Added
- filter:
Filter::checkandAsyncFilter::checkmethods which check a request against the filter'sPredicate(#521) - filter: Added
get_ref,get_mut, andinto_innermethods toFilterandAsyncFilter, allowing access to the wrapped service (#522) - util: Added
layerassociated function toAndThen,Then,MapRequest,MapResponse, andMapResulttypes. These return aLayerthat produces middleware of that type, as a convenience to avoid having to import theLayertype separately. (#524) - util: Added missing
Cloneimpls toAndThenLayer,MapRequestLayer, andMapErrLayer, when the mapped function implementsClone(#525) - util: Added
FutureService::newconstructor, with less restrictive bounds than thefuture_servicefree function (#523)
0.4.2 (January 11, 2021)
Added
- Export
layer_fnandLayerFnfrom thetower::layermodule. (#516)
Fixed
- Fix missing
Syncimplementation forBufferandConcurrencyLimit(#518)
0.4.1 (January 7, 2021)
Fixed
- Updated
tower-layerto 0.3.1 to fix broken re-exports.
0.4.0 (January 7, 2021)
This is a major breaking release including a large number of changes. In
particular, this release updates tower to depend on Tokio 1.0, and moves all
middleware into the tower crate. In addition, Tower 0.4 reworks several
middleware APIs, as well as introducing new ones.
This release does not change the core Service or Layer traits, so tower
0.4 still depends on tower-service 0.3 and tower-layer 0.3. This means that
tower 0.4 is still compatible with libraries that depend on those crates.
Added
- make: Added
MakeService::into_serviceandMakeService::as_servicefor convertingMakeServices intoServices (#492) - steer: Added
steermiddleware for routing requests to one of a set of services (#426) - util: Added
MapRequestmiddleware andServiceExt::map_request, for applying a function to a request before passing it to the inner service (#435) - util: Added
MapResponsemiddleware andServiceExt::map_response, for applying a function to theResponsetype of an inner service after its future completes (#435) - util: Added
MapErrmiddleware andServiceExt::map_err, for applying a function to theErrorreturned by an inner service if it fails (#396) - util: Added
MapResultmiddleware andServiceExt::map_result, for applying a function to theResultreturned by an inner service's future regardless of whether it succeeds or fails (#499) - util: Added
Thenmiddleware andServiceExt::then, for chaining another future after an inner service's future completes (with aResponseor anError) (#500) - util: Added
AndThenmiddleware andServiceExt::and_then, for chaining another future after an inner service's future completes successfully (#485) - util: Added
layer_fn, for constructing aLayerfrom a function taking aServiceand returning a differentService(#491) - util: Added
FutureService, which implementsServicefor aFuturewhoseOutputtype is aService([#496]) - util: Added
BoxService::layerandUnsyncBoxService::layer, to make constructing layers more ergonomic (#503) - layer: Added
Layerimpl for&Layer(#446) - retry: Added
Retry::get_ref,Retry::get_mut, andRetry::into_innerto access the inner service (#463) - timeout: Added
Timeout::get_ref,Timeout::get_mut, andTimeout::into_innerto access the inner service (#463) - buffer: Added
CloneandCopyimpls forBufferLayer(#[493]) - Several documentation improvements (#442, #444, #445, #449, #487, #490, #506])
Changed
- All middleware
tower-*crates were merged intotowerand placed behind feature flags (#432) - Updated Tokio dependency to 1.0 (#489)
- builder: Make
ServiceBuilder::servicetakeselfby reference rather than by value (#504) - reconnect: Return errors from
MakeServicein the response future, rather than inpoll_ready, allowing the reconnect service to be reused when a reconnect fails (#386, #437) - discover: Changed
Discoverto be a sealed trait alias for aTryStream<Item = Change>.Discoverimplementations are now written by implementingStream. (#443) - load: Renamed the
Instrumenttrait toTrackCompletion(#445) - load: Renamed
NoInstrumenttoCompleteOnResponse(#445) - balance: Renamed
BalanceLayertoMakeBalanceLayer(#449) - balance: Renamed
BalanceMaketoMakeBalance(#449) - ready-cache: Changed
ready_cache::error::Failed'sfmt::Debugimpl to require the key type to also implementfmt::Debug(#467) - filter: Changed
FilterandPredicateto use a synchronous function as a predicate (#508) - filter: Renamed the previous
FilterandPredicate(wherePredicates returned aFuture) toAsyncFilterandAsyncPredicate(#508) - filter:
Predicates now take aRequesttype by value and may return a new request, potentially of a different type (#508) - filter:
Predicates may now return an error of any type (#508)
Fixed
- limit: Fixed an issue where
RateLimitservices do not reset the remaining count when rate limiting (#438, [#439]) - util: Fixed a bug where
oneshotfutures panic if the service does not immediately become ready (#447) - ready-cache: Fixed
ready_cache::error::Failednot returning inner error types viaError::source(#467) - hedge: Fixed an interaction with
bufferwherebufferslots were eagerly reserved for hedge requests even if they were not sent (#472) - hedge: Fixed the use of a fixed 10 second bound on the hedge latency histogram resulting on errors with longer-lived requests. The latency histogram now automatically resizes (#484)
- buffer: Fixed an issue where tasks waiting for buffer capacity were not woken when a buffer is dropped, potentially resulting in a task leak (#480)
Removed
- Remove
ServiceExt::ready. - discover: Removed
discover::streammodule, sinceDiscoveris now an alias forStream(#443) - buffer: Removed
MakeBalance::from_rng, which caused all balancers to use the same RNG (#497)
0.3.1 (January 17, 2020)
- Allow opting out of tracing/log (#410).
0.3.0 (December 19, 2019)
- Update all tower based crates to
0.3. - Update to
tokio 0.2 - Update to
futures 0.3
0.3.0-alpha.2 (September 30, 2019)
- Move to
futures-*-preview 0.3.0-alpha.19 - Move to
pin-project 0.4
0.3.0-alpha.1a (September 13, 2019)
- Update
tower-bufferto0.3.0-alpha.1b
0.3.0-alpha.1 (September 11, 2019)
- Move to
std::future
0.1.1 (July 19, 2019)
- Add
ServiceBuilder::into_inner
0.1.0 (April 26, 2019)
- Initial release