[][src]Struct sozu_command_lib::state::ConfigState

pub struct ConfigState {
    pub applications: HashMap<AppId, Application>,
    pub backends: HashMap<AppId, Vec<Backend>>,
    pub http_listeners: HashMap<SocketAddr, (HttpListener, bool)>,
    pub https_listeners: HashMap<SocketAddr, (HttpsListener, bool)>,
    pub tcp_listeners: HashMap<SocketAddr, (TcpListener, bool)>,
    pub http_fronts: HashMap<AppId, Vec<HttpFront>>,
    pub https_fronts: HashMap<AppId, Vec<HttpFront>>,
    pub tcp_fronts: HashMap<AppId, Vec<TcpFront>>,
    pub certificates: HashMap<SocketAddr, HashMap<CertFingerprint, (CertificateAndKey, Vec<String>)>>,
    pub http_addresses: Vec<SocketAddr>,
    pub https_addresses: Vec<SocketAddr>,
}

Fields

applications: HashMap<AppId, Application>backends: HashMap<AppId, Vec<Backend>>http_listeners: HashMap<SocketAddr, (HttpListener, bool)>

the bool indicates if it is active or not

https_listeners: HashMap<SocketAddr, (HttpsListener, bool)>tcp_listeners: HashMap<SocketAddr, (TcpListener, bool)>http_fronts: HashMap<AppId, Vec<HttpFront>>https_fronts: HashMap<AppId, Vec<HttpFront>>tcp_fronts: HashMap<AppId, Vec<TcpFront>>certificates: HashMap<SocketAddr, HashMap<CertFingerprint, (CertificateAndKey, Vec<String>)>>http_addresses: Vec<SocketAddr>https_addresses: Vec<SocketAddr>

Implementations

impl ConfigState[src]

pub fn new() -> ConfigState[src]

pub fn add_http_address(&mut self, address: SocketAddr)[src]

pub fn add_https_address(&mut self, address: SocketAddr)[src]

pub fn handle_order(&mut self, order: &ProxyRequestData) -> bool[src]

returns true if the order modified something

pub fn generate_orders(&self) -> Vec<ProxyRequestData>[src]

pub fn generate_activate_orders(&self) -> Vec<ProxyRequestData>[src]

pub fn diff(&self, other: &ConfigState) -> Vec<ProxyRequestData>[src]

pub fn hash_state(&self) -> BTreeMap<AppId, u64>[src]

pub fn application_state(&self, app_id: &str) -> QueryAnswerApplication[src]

pub fn count_backends(&self) -> usize[src]

pub fn count_frontends(&self) -> usize[src]

Trait Implementations

impl Clone for ConfigState[src]

impl Debug for ConfigState[src]

impl Default for ConfigState[src]

impl<'de> Deserialize<'de> for ConfigState[src]

impl Eq for ConfigState[src]

impl PartialEq<ConfigState> for ConfigState[src]

impl Serialize for ConfigState[src]

impl StructuralEq for ConfigState[src]

impl StructuralPartialEq for ConfigState[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Reset for T where
    T: Clone + Default
[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.