mcpr_core/proxy/
proxy_state.rs1use std::sync::Arc;
7
8use arc_swap::ArcSwap;
9
10use crate::event::EventBus;
11use crate::protocol::schema_manager::{MemorySchemaStore, SchemaManager};
12use crate::protocol::session::MemorySessionStore;
13
14use super::RewriteConfig;
15use super::forwarding::UpstreamClient;
16use super::health::SharedProxyHealth;
17use super::widgets::WidgetSource;
18
19pub struct ProxyState {
21 pub name: String,
23
24 pub mcp_upstream: String,
26 pub upstream: UpstreamClient,
27 pub max_request_body: usize,
28 pub max_response_body: usize,
29
30 pub rewrite_config: Arc<ArcSwap<RewriteConfig>>,
34 pub widget_source: Option<WidgetSource>,
35
36 pub sessions: MemorySessionStore,
38 pub schema_manager: Arc<SchemaManager<MemorySchemaStore>>,
39
40 pub health: SharedProxyHealth,
42
43 pub event_bus: EventBus,
45}