#tower #buffer #middleware

tower-buffer

Buffer requests before dispatching to a Service

9 releases

0.3.0 Dec 19, 2019
0.3.0-alpha.1b Sep 14, 2019
0.3.0-alpha.2 Oct 1, 2019
0.1.2 Oct 11, 2019
0.0.0 Nov 16, 2017

#1642 in Asynchronous

Download history 1451/week @ 2023-10-20 1749/week @ 2023-10-27 1578/week @ 2023-11-03 1514/week @ 2023-11-10 1537/week @ 2023-11-17 1056/week @ 2023-11-24 855/week @ 2023-12-01 1228/week @ 2023-12-08 964/week @ 2023-12-15 737/week @ 2023-12-22 989/week @ 2023-12-29 1635/week @ 2024-01-05 1017/week @ 2024-01-12 1086/week @ 2024-01-19 996/week @ 2024-01-26 709/week @ 2024-02-02

3,994 downloads per month
Used in 26 crates (via noria)

MIT license

58KB
868 lines

Tower Buffer

Buffer requests before dispatching to a Service.

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.


lib.rs:

Buffer requests when the inner service is out of capacity.

Buffering works by spawning a new task that is dedicated to pulling requests out of the buffer and dispatching them to the inner service. By adding a buffer and a dedicated task, the Buffer layer in front of the service can be Clone even if the inner service is not.

Dependencies

~5MB
~86K SLoC