pub struct Config {
pub server: ServerCfg,
pub auth: AuthCfg,
pub ratelimit: RateLimitCfg,
pub validation: ValidationCfg,
pub headers: HeadersCfg,
pub tls: TlsCfg,
pub waf: WafCfg,
}Fields§
§server: ServerCfg§auth: AuthCfg§ratelimit: RateLimitCfg§validation: ValidationCfg§headers: HeadersCfg§tls: TlsCfg§waf: WafCfgImplementations§
Source§impl Config
impl Config
Sourcepub fn load(path: Option<&str>) -> Result<Config>
pub fn load(path: Option<&str>) -> Result<Config>
Load defaults, overlay an optional TOML file, then apply env overrides.
Sourcepub fn upstream_base(&self) -> String
pub fn upstream_base(&self) -> String
The upstream base URL EdgeGuard forwards to, e.g. “http://127.0.0.1:3000”.
Sourcepub fn upstream_probe_addr(&self) -> Option<(String, u16)>
pub fn upstream_probe_addr(&self) -> Option<(String, u16)>
The (host, port) EdgeGuard probes for readiness, mirroring Self::upstream_base:
co-process mode probes 127.0.0.1:app_port; an explicit upstream URL is parsed,
defaulting the port from the scheme. Returns None if the URL carries no usable
host, so the readiness check reports “not ready” rather than panicking.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more