pub struct Proxy { /* private fields */ }Implementations§
Source§impl Proxy
impl Proxy
Sourcepub async fn bind(config: &Config) -> Result<Self, Box<dyn Error + Send + Sync>>
pub async fn bind(config: &Config) -> Result<Self, Box<dyn Error + Send + Sync>>
Bind a proxy from config with the default extension surface (built-in
modules, in-memory rate-limit store, file-based TLS cert). For embedding —
injecting a custom store or extra modules — use Proxy::builder.
Sourcepub fn builder(config: &Config) -> ProxyBuilder<'_>
pub fn builder(config: &Config) -> ProxyBuilder<'_>
Start configuring a proxy with injectable extension points (the stable
embedding API): extra detection modules and the rate-limit StateStore.
Every seam has a default, so Proxy::builder(cfg).build() equals
Proxy::bind.
Sourcepub fn reloader(&self) -> Reloader
pub fn reloader(&self) -> Reloader
A cheap, cloneable handle to hot-reload this proxy’s configuration.
Obtain it before run() (which consumes self); the binary wires it to
SIGHUP, tests call reload_from directly.
pub fn local_addr(&self) -> Result<SocketAddr>
Sourcepub fn metrics_addr(&self) -> Option<SocketAddr>
pub fn metrics_addr(&self) -> Option<SocketAddr>
Address of the metrics endpoint, when [metrics].enabled (tests/operability).
pub async fn run(self) -> Result<(), Box<dyn Error + Send + Sync>>
Auto Trait Implementations§
impl !Freeze for Proxy
impl !RefUnwindSafe for Proxy
impl !UnwindSafe for Proxy
impl Send for Proxy
impl Sync for Proxy
impl Unpin for Proxy
impl UnsafeUnpin for Proxy
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