Skip to main content

bound

Function bound 

Source
pub async fn bound(
    __arg0: State<RequestBounds>,
    req: Request,
    next: Next,
) -> Response
Expand description

Take a permit and run the request within its timeout, or refuse it.

A refusal is still counted by crate::metrics::track_requests under its status, because that layer wraps this one; here it is also counted by why, so an operator can tell the cap from a backend’s own 503.