tower/README.md

105 lines
4.0 KiB
Markdown
Raw Normal View History

2018-08-09 10:08:57 -07:00
# Tower
2016-08-26 16:27:58 -07:00
2018-08-09 10:08:57 -07:00
Tower is a library of modular and reusable components for building robust
networking clients and servers.
2017-11-16 11:26:36 -08:00
2017-11-16 11:47:19 -08:00
[![Build Status](https://travis-ci.org/tower-rs/tower.svg?branch=master)](https://travis-ci.org/tower-rs/tower)
2018-08-10 11:26:34 -07:00
[![Gitter](https://badges.gitter.im/tower-rs/tower.svg)](https://gitter.im/tower-rs/tower)
2016-08-26 16:27:58 -07:00
2018-08-09 10:08:57 -07:00
## 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
2019-02-23 08:45:56 -08:00
([docs][ts-docs]).
2018-08-09 10:08:57 -07:00
* [`tower-layer`]: The foundational trait to compose services together
([docs][tl-docs]).
2018-08-09 10:08:57 -07:00
* [`tower-balance`]: A load balancer. Load is balanced across a number of
2019-02-23 08:45:56 -08:00
services ([docs][tb-docs]).
2018-08-09 10:08:57 -07:00
* [`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][tbuf-docs]).
* [`tower-discover`]: Service discovery abstraction ([docs][td-docs]).
* [`tower-filter`]: Middleware that conditionally dispatch requests to the inner
service based on a predicate ([docs][tf-docs]);
* [`tower-in-flight-limit`]: Middleware limiting the number of requests that
2018-08-09 10:08:57 -07:00
are in-flight for the inner service ([docs][tifl-docs]).
* [`tower-mock`]: Testing utility for mocking a `Service`. This is useful for
testing middleware implementations ([docs][tm-docs]);
2018-08-09 10:08:57 -07:00
* [`tower-rate-limit`]: Middleware limiting the number of requests to the inner
service over a period of time ([docs][trl-docs]).
* [`tower-reconnect`]: Middleware that automatically reconnects the inner
service when it becomes degraded ([docs][tre-docs]).
* [`tower-retry`]: Middleware that retries requests based on a given `Policy`
([docs][tretry-docs]).
2018-08-09 10:08:57 -07:00
* [`tower-timeout`]: Middleware that applies a timeout to requests
([docs][tt-docs]).
* [`tower-util`]: Miscellaneous additional utilities for Tower
([docs][tu-docs]).
* [`tower-watch`]: A middleware that rebinds the inner service each time a watch
is notified ([docs][tw-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](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.
2018-01-17 12:57:48 -08:00
2018-08-09 10:08:57 -07:00
[`tower-service`]: tower-service
[ts-docs]: https://docs.rs/tower-service/
[`tower-layer`]: tower-layer
[tl-docs]: https://docs.rs/tower-layer/
2018-08-09 10:08:57 -07:00
[`tower-balance`]: tower-balance
[tb-docs]: https://tower-rs.github.io/tower/tower_balance/index.html
[`tower-buffer`]: tower-buffer
[tbuf-docs]: https://tower-rs.github.io/tower/tower_buffer/index.html
[`tower-discover`]: tower-discover
[td-docs]: https://tower-rs.github.io/tower/tower_discover/index.html
[`tower-filter`]: tower-filter
[tf-docs]: https://tower-rs.github.io/tower/tower_filter/index.html
[`tower-in-flight-limit`]: tower-in-flight-limit
[tifl-docs]: https://tower-rs.github.io/tower/tower_in_flight_limit/index.html
[`tower-mock`]: tower-mock
[tm-docs]: https://tower-rs.github.io/tower/tower_mock/index.html
[`tower-rate-limit`]: tower-rate-limit
[trl-docs]: https://tower-rs.github.io/tower/tower_rate_limit/index.html
[`tower-reconnect`]: tower-reconnect
[tre-docs]: https://tower-rs.github.io/tower/tower_reconnect/index.html
[`tower-retry`]: tower-retry
[tretry-docs]: https://tower-rs.github.io/tower/tower_retry/index.html
[`tower-timeout`]: tower-timeout
2018-08-09 10:08:57 -07:00
[tt-docs]: https://tower-rs.github.io/tower/tower_timeout/index.html
[`tower-util`]: tower-util
[tu-docs]: https://tower-rs.github.io/tower/tower_util/index.html
[`tower-watch`]: tower-watch
[tw-docs]: https://tower-rs.github.io/tower/tower_watch/index.html