pub struct SoloHttpState {
pub registry: Arc<TenantRegistry>,
pub default_tenant: TenantId,
pub user_aliases: Arc<Vec<String>>,
pub mcp_sessions: SessionStore,
}Expand description
HTTP-side application state. v0.8.0 P2 swapped per-handler `WriteHandle
- ReaderPool + …
for aTenantRegistrythat resolves tenant on each request via theX-Solo-Tenant` header (default tenant if absent).
Fields§
§registry: Arc<TenantRegistry>Multi-tenant registry. Lazy-loads tenants on first request.
default_tenant: TenantIdDefault tenant used when the X-Solo-Tenant header is absent.
Typically TenantId::default_tenant().
user_aliases: Arc<Vec<String>>Read-path aliases for the canonical "user" subject. Sourced
from solo.config.toml [identity] user_aliases; threaded
through to solo_query::facts_about so a query for "alex"
also surfaces rows historically extracted as "user". Empty
vec = behave as today. Wrapped in Arc so handler clone()s
stay cheap. v0.5.0 Priority 1 sub-step 1C.
mcp_sessions: SessionStorev0.11.0 P1: MCP Mcp-Session-Id session store. In-memory,
TTL-bounded (30 min inactivity / 4 hr absolute). The middleware
on the /mcp route validates request headers against this
store; the POST handler creates new entries on the first
request without a session id. See
crates/solo-api/src/mcp_session.rs +
docs/dev-log/0132-v0.11.0-implementation-plan.md §3 Decision A.
Trait Implementations§
Source§impl Clone for SoloHttpState
impl Clone for SoloHttpState
Source§fn clone(&self) -> SoloHttpState
fn clone(&self) -> SoloHttpState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SoloHttpState
impl !RefUnwindSafe for SoloHttpState
impl Send for SoloHttpState
impl Sync for SoloHttpState
impl Unpin for SoloHttpState
impl UnsafeUnpin for SoloHttpState
impl !UnwindSafe for SoloHttpState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more