pub struct AppState {
pub config: Arc<ProxyConfig>,
pub http: Client,
pub providers: ProviderRegistry,
pub gate_health: Arc<GateHealthRegistry>,
pub traces: TraceSender,
}Expand description
Shared state handed to every request handler. Cheap to clone: an Arced config, a
pooled HTTP client, and a bounded channel sender.
Fields§
§config: Arc<ProxyConfig>Static proxy configuration.
http: ClientShared, connection-pooled HTTP client used to call upstream (observe passthrough).
providers: ProviderRegistryMulti-provider registry used by the enforce-mode escalation engine.
gate_health: Arc<GateHealthRegistry>Per-gate error budgets (auto-disable), shared across requests.
traces: TraceSenderFire-and-forget sender to the background trace writer.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Freeze for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
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