[][src]Struct sozu_lib::Backend

pub struct Backend {
    pub sticky_id: Option<String>,
    pub backend_id: String,
    pub address: SocketAddr,
    pub status: BackendStatus,
    pub retry_policy: RetryPolicyWrapper,
    pub active_connections: usize,
    pub failures: usize,
    pub load_balancing_parameters: Option<LoadBalancingParams>,
    pub backup: bool,
}

Fields

sticky_id: Option<String>backend_id: Stringaddress: SocketAddrstatus: BackendStatusretry_policy: RetryPolicyWrapperactive_connections: usizefailures: usizeload_balancing_parameters: Option<LoadBalancingParams>backup: bool

Implementations

impl Backend[src]

pub fn new(
    backend_id: &str,
    address: SocketAddr,
    sticky_id: Option<String>,
    load_balancing_parameters: Option<LoadBalancingParams>,
    backup: Option<bool>
) -> Backend
[src]

pub fn set_closing(&mut self)[src]

pub fn retry_policy(&mut self) -> &mut RetryPolicyWrapper[src]

pub fn can_open(&self) -> bool[src]

pub fn inc_connections(&mut self) -> Option<usize>[src]

pub fn dec_connections(&mut self) -> Option<usize>[src]

pub fn try_connect(&mut self) -> Result<TcpStream, ConnectionError>[src]

Trait Implementations

impl Clone for Backend[src]

impl Debug for Backend[src]

impl Eq for Backend[src]

impl PartialEq<Backend> for Backend[src]

impl StructuralEq for Backend[src]

impl StructuralPartialEq for Backend[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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