Skip to main content

RequestState

Struct RequestState 

Source
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: usize

The 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: i32

The total number of requests currently being processed by the service.

§accepted_count: u64

The total number of requests accepted by the service.

§location_processing_count: i32

The number of requests currently being processed for this location.

§location_accepted_count: u64

The total number of requests accepted for this location.

§proxying: bool

The 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: bool

A 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: bool

The 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.

Trait Implementations§

Source§

impl Default for RequestState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more