Go to file
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
examples Format tower with rustfmt; check in CI (#157) 2019-02-11 15:11:31 -08:00
src Add initial base tower crate (#149) 2019-01-19 12:47:03 -05:00
tower-balance buffer: replace generic error with Box<Error> (#168) 2019-02-26 13:40:16 -08:00
tower-buffer layer: Add `tower-layer` and the `Layer` trait (#163) 2019-02-27 15:28:42 -05:00
tower-discover tower-service v0.2.0 (#135) 2018-12-12 16:14:05 -05:00
tower-filter layer: Add `tower-layer` and the `Layer` trait (#163) 2019-02-27 15:28:42 -05:00
tower-in-flight-limit layer: Add `tower-layer` and the `Layer` trait (#163) 2019-02-27 15:28:42 -05:00
tower-layer layer: Add `tower-layer` and the `Layer` trait (#163) 2019-02-27 15:28:42 -05:00
tower-mock buffer: replace generic error with Box<Error> (#168) 2019-02-26 13:40:16 -08:00
tower-rate-limit layer: Add `tower-layer` and the `Layer` trait (#163) 2019-02-27 15:28:42 -05:00
tower-reconnect Require `poll_ready` to be called before `call` (#161) 2019-02-21 12:18:56 -08:00
tower-retry layer: Add `tower-layer` and the `Layer` trait (#163) 2019-02-27 15:28:42 -05:00
tower-service layer: Add `tower-layer` and the `Layer` trait (#163) 2019-02-27 15:28:42 -05:00
tower-timeout layer: Add `tower-layer` and the `Layer` trait (#163) 2019-02-27 15:28:42 -05:00
tower-util ext: add ServiceExt::oneshot to call the service when it is ready (#164) 2019-02-22 16:15:42 -08:00
tower-watch Format tower with rustfmt; check in CI (#157) 2019-02-11 15:11:31 -08:00
.gitignore Initial commit 2016-08-26 16:26:03 -07:00
.travis.yml Format tower with rustfmt; check in CI (#157) 2019-02-11 15:11:31 -08:00
Cargo.toml layer: Add `tower-layer` and the `Layer` trait (#163) 2019-02-27 15:28:42 -05:00
LICENSE Update the license for 2019 and tower contributors (#148) 2019-01-15 17:29:08 -05:00
README.md layer: Add `tower-layer` and the `Layer` trait (#163) 2019-02-27 15:28:42 -05:00

README.md

Tower

Tower is a library of modular and reusable components for building robust networking clients and servers.

Build Status Gitter

Overview

Tower aims to make it as easy as possible to build robust networking clients and servers. It is protocol agnostic, but is designed around a request / response pattern. If your protocol is entirely stream based, Tower may not be a good fit.

Project Layout

Tower consists of a number of components, each of which live in their own sub crates.

  • tower-service: The foundational traits upon which Tower is built (docs).

  • tower-layer: The foundational trait to compose services together (docs).

  • tower-balance: A load balancer. Load is balanced across a number of services (docs).

  • tower-buffer: A buffering middleware. If the inner service is not ready to handle the next request, tower-buffer stores the request in an internal queue (docs).

  • tower-discover: Service discovery abstraction (docs).

  • tower-filter: Middleware that conditionally dispatch requests to the inner service based on a predicate (docs);

  • tower-in-flight-limit: Middleware limiting the number of requests that are in-flight for the inner service (docs).

  • tower-mock: Testing utility for mocking a Service. This is useful for testing middleware implementations (docs);

  • tower-rate-limit: Middleware limiting the number of requests to the inner service over a period of time (docs).

  • tower-reconnect: Middleware that automatically reconnects the inner service when it becomes degraded (docs).

  • tower-retry: Middleware that retries requests based on a given Policy (docs).

  • tower-timeout: Middleware that applies a timeout to requests (docs).

  • tower-util: Miscellaneous additional utilities for Tower (docs).

  • tower-watch: A middleware that rebinds the inner service each time a watch is notified (docs).

Status

Currently, only tower-service, the foundational trait, has been released to crates.io. The rest of the library will be following shortly.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tower by you, shall be licensed as MIT, without any additional terms or conditions.