Struct sozu_command_lib::state::ConfigState
source · [−]pub struct ConfigState {
pub applications: BTreeMap<AppId, Application>,
pub backends: BTreeMap<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: BTreeMap<AppId, Application>
backends: BTreeMap<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
sourceimpl 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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
pub fn generate_activate_orders(&self) -> Vec<ProxyRequestData>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
pub fn diff(&self, other: &ConfigState) -> Vec<ProxyRequestData>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
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
sourceimpl Clone for ConfigState
impl Clone for ConfigState
sourcefn clone(&self) -> ConfigState
fn clone(&self) -> ConfigState
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ConfigState
impl Debug for ConfigState
sourceimpl Default for ConfigState
impl Default for ConfigState
sourcefn default() -> ConfigState
fn default() -> ConfigState
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ConfigState
impl<'de> Deserialize<'de> for ConfigState
sourcefn 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
sourceimpl PartialEq<ConfigState> for ConfigState
impl PartialEq<ConfigState> for ConfigState
sourcefn eq(&self, other: &ConfigState) -> bool
fn eq(&self, other: &ConfigState) -> bool
sourceimpl Serialize for ConfigState
impl Serialize for ConfigState
impl Eq for ConfigState
impl StructuralEq for ConfigState
impl StructuralPartialEq for ConfigState
Auto Trait Implementations
impl RefUnwindSafe for ConfigState
impl Send for ConfigState
impl Sync for ConfigState
impl Unpin for ConfigState
impl UnwindSafe for ConfigState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more