pub struct ProxyState {
pub upstream_url: String,
pub middleware: MiddlewareChain,
pub client: Client<HttpConnector, Incoming>,
pub audit_sink: Option<Arc<AuditSink>>,
pub redaction_config: RedactionConfig,
pub metrics: Arc<ArbiterMetrics>,
}Expand description
Shared state for the proxy handler.
Fields§
§upstream_url: StringUpstream base URL (no trailing slash).
middleware: MiddlewareChainThe middleware chain applied to every proxied request.
client: Client<HttpConnector, Incoming>HTTP client for forwarding requests upstream.
audit_sink: Option<Arc<AuditSink>>Audit sink for writing structured audit entries.
redaction_config: RedactionConfigRedaction config for audit argument scrubbing.
metrics: Arc<ArbiterMetrics>Prometheus metrics.
Implementations§
Source§impl ProxyState
impl ProxyState
Sourcepub fn new(
upstream_url: String,
middleware: MiddlewareChain,
audit_sink: Option<Arc<AuditSink>>,
redaction_config: RedactionConfig,
metrics: Arc<ArbiterMetrics>,
) -> Self
pub fn new( upstream_url: String, middleware: MiddlewareChain, audit_sink: Option<Arc<AuditSink>>, redaction_config: RedactionConfig, metrics: Arc<ArbiterMetrics>, ) -> Self
Create a new proxy state with the given upstream URL and middleware chain.
Auto Trait Implementations§
impl Freeze for ProxyState
impl !RefUnwindSafe for ProxyState
impl Send for ProxyState
impl Sync for ProxyState
impl Unpin for ProxyState
impl UnsafeUnpin for ProxyState
impl !UnwindSafe for ProxyState
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