Struct sozu_command_lib::state::ConfigState
source · 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)>
§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§
source§impl ConfigState
impl ConfigState
pub fn new() -> ConfigState
pub fn add_http_address(&mut self, address: SocketAddr)
pub fn add_https_address(&mut self, address: SocketAddr)
sourcepub fn handle_order(&mut self, order: &ProxyRequestData) -> bool
pub fn handle_order(&mut self, order: &ProxyRequestData) -> bool
returns true if the order modified something
pub fn generate_orders(&self) -> Vec<ProxyRequestData> ⓘ
pub fn generate_activate_orders(&self) -> Vec<ProxyRequestData> ⓘ
pub fn diff(&self, other: &ConfigState) -> Vec<ProxyRequestData> ⓘ
pub fn hash_state(&self) -> BTreeMap<AppId, u64>
pub fn application_state(&self, app_id: &str) -> QueryAnswerApplication
pub fn count_backends(&self) -> usize
pub fn count_frontends(&self) -> usize
Trait Implementations§
source§impl Clone for ConfigState
impl Clone for ConfigState
source§fn clone(&self) -> ConfigState
fn clone(&self) -> ConfigState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ConfigState
impl Debug for ConfigState
source§impl Default for ConfigState
impl Default for ConfigState
source§fn default() -> ConfigState
fn default() -> ConfigState
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ConfigState
impl<'de> Deserialize<'de> for ConfigState
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more