Skip to main content

UpstreamInfo

Struct UpstreamInfo 

Source
pub struct UpstreamInfo {
Show 15 fields pub upstream_instance: Option<Arc<dyn UpstreamInstance>>, pub location_instance: Option<Arc<dyn LocationInstance>>, pub location: Arc<str>, pub name: Arc<str>, pub address: String, pub reused: bool, pub processing_count: Option<i32>, pub connected_count: Option<i32>, pub status: Option<StatusCode>, pub retries: u8, pub max_retries: Option<u8>, pub max_retry_window: Option<Duration>, pub failed_addresses: Vec<String>, pub backend_inflight: Option<InflightGuard>, pub sticky_cookie: Option<String>,
}
Expand description

Information about the upstream (backend) server.

Fields§

§upstream_instance: Option<Arc<dyn UpstreamInstance>>

Upstream instance

§location_instance: Option<Arc<dyn LocationInstance>>

Location instance

§location: Arc<str>

The location (route) that directed the request to this upstream.

§name: Arc<str>

The name of the upstream server or group.

§address: String

The address of the upstream server.

§reused: bool

Indicates if the connection to the upstream was reused.

§processing_count: Option<i32>

The number of requests currently being processed by the upstream.

§connected_count: Option<i32>

The current number of active connections to the upstream.

§status: Option<StatusCode>

The HTTP status code of upstream response.

§retries: u8

The number of retries for failed connections.

§max_retries: Option<u8>

Maximum number of retries for failed connections.

§max_retry_window: Option<Duration>

The maximum total time window allowed for an operation and all of its subsequent retries.

The timer starts from the beginning of the initial attempt. Once this time window is exceeded, no more retries will be initiated, even if the maximum number of retries (max_retries) has not been reached.

If set to None, there is no time limit for the retry process.

§failed_addresses: Vec<String>

The backends this request was sent to and that failed it in a way that is retried. The next attempt goes to another one, where there is one.

§backend_inflight: Option<InflightGuard>

The request as one in flight on its backend, for an upstream that chooses by that (least_conn): counted from the attempt to the next one, or to the end of the request.

§sticky_cookie: Option<String>

The cookie that keeps the client on the backend it was given, for an upstream that does so (sticky:<cookie>): name=value, to be set on the response when the client does not have it yet, or has it for another backend.

Trait Implementations§

Source§

impl Default for UpstreamInfo

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