pub struct RequestState {
pub request_id: Option<String>,
pub status: Option<StatusCode>,
pub payload_size: usize,
pub guards: Vec<Guard>,
pub processing_count: i32,
pub accepted_count: u64,
pub location_processing_count: i32,
pub location_accepted_count: u64,
pub proxying: bool,
pub stale_for_status: bool,
pub body_end_said: bool,
pub rate_limit: Option<RateLimitQuota>,
}Expand description
State related to the current request being processed.
Fields§
§request_id: Option<String>A unique identifier for the request.
status: Option<StatusCode>The HTTP status code of the response.
payload_size: usizeThe size of the request payload in bytes.
guards: Vec<Guard>The inflight limiters this request is counted in, one guard each. A limiter’s count goes down again when its guard is dropped, at the end of the request.
processing_count: i32The total number of requests currently being processed by the service.
accepted_count: u64The total number of requests accepted by the service.
location_processing_count: i32The number of requests currently being processed for this location.
location_accepted_count: u64The total number of requests accepted for this location.
proxying: boolThe request passed every filter and is on its way to an upstream. A failure from here on closes the client’s connection, whatever the proxy says of it: pingora asks whether it may be kept only for a request that failed in one of the filters.
stale_for_status: boolA stale response of the cache is being answered for a 5xx of
the upstream (stale-if-error). The proxy goes by it to tell
where the body of that answer ends, which pingora does not say on
this path: see Server::response_body_filter.
body_end_said: boolThe plugins have been told that the body of the response ends: they are told once, whoever says it.
rate_limit: Option<RateLimitQuota>The budget to report to the client, from the limit that has the least left of those that were asked to report theirs.