1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! A [Pingora](https://github.com/cloudflare/pingora) reverse proxy for
//! [Autumn](https://autumn-web.app).
//!
//! ```rust,ignore
//! use autumn_plugin_pingora::{PingoraPlugin, Route};
//!
//! #[autumn_web::main]
//! async fn main() {
//! autumn_web::app()
//! .routes(routes![index])
//! .plugin(PingoraPlugin::new().route(
//! Route::new("billing").path_prefix("/billing").upstream("10.0.0.7:8080"),
//! ))
//! .run()
//! .await;
//! }
//! ```
//!
//! The proxy has its own listener. The default is `127.0.0.1:8080` in
//! `dev` and `test`, and `0.0.0.0:8080` in other profiles. The proxy sends
//! matched requests to the route's upstream pool. It sends all other
//! requests to the Autumn app. It adds:
//!
//! - round-robin or consistent-hash load balancing,
//! - TCP health checks and connect retries,
//! - `X-Forwarded-*` headers,
//! - body and connection limits,
//! - a `pingora` indicator in `/actuator/health`,
//! - `pingora_proxy_*` metrics in `/actuator/prometheus`,
//! - graceful drain on Autumn's shutdown signal.
//!
//! See [`PingoraConfig`] for the `[pingora]` section of `autumn.toml`.
pub use ;
pub use PingoraError;
pub use ;
pub use ;
pub use ;