loadpace_tower/lib.rs
1//! Tower integration for adaptive client-side load balancing and backpressure.
2//!
3//! Use this crate when a Tower client balances requests across a changing fleet
4//! and needs each endpoint to adapt to its own capacity and latency. The
5//! adapter preserves Tower's backpressure, paces dispatch using a per-endpoint
6//! GCRA schedule, and exposes predicted completion cost for P2C selection.
7//!
8//! The adapter keeps Tower-specific readiness, discovery, and load-balancing
9//! concerns out of the runtime-independent `loadpace` crate.
10
11#![forbid(unsafe_code)]
12
13mod service;
14
15pub use service::{AdaptiveDiscovery, AdaptiveEndpoint, LoadMetric, ResponseFuture};