pub struct SchemaAwareRouter { /* private fields */ }Expand description
Schema-aware query router
Implementations§
Source§impl SchemaAwareRouter
impl SchemaAwareRouter
Sourcepub fn new(config: SchemaRoutingConfig, schema: Arc<SchemaRegistry>) -> Self
pub fn new(config: SchemaRoutingConfig, schema: Arc<SchemaRegistry>) -> Self
Create a new schema-aware router
Sourcepub fn remove_node(&mut self, node_id: &str)
pub fn remove_node(&mut self, node_id: &str)
Remove a node from the router
Sourcepub fn update_node(&mut self, node_id: &str, load: f64, latency_ms: u64)
pub fn update_node(&mut self, node_id: &str, load: f64, latency_ms: u64)
Update node status
Sourcepub fn route(&self, query: &str) -> RoutingDecision
pub fn route(&self, query: &str) -> RoutingDecision
Route a query
Sourcepub fn route_with_branch(&self, query: &str, branch: &str) -> RoutingDecision
pub fn route_with_branch(&self, query: &str, branch: &str) -> RoutingDecision
Route with branch context
Sourcepub fn route_time_travel(&self, query: &str, age_days: i64) -> RoutingDecision
pub fn route_time_travel(&self, query: &str, age_days: i64) -> RoutingDecision
Route for time-travel query
Sourcepub fn route_rag(&self, stage: RAGStage, query: &str) -> RoutingDecision
pub fn route_rag(&self, stage: RAGStage, query: &str) -> RoutingDecision
Route RAG query
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaAwareRouter
impl !RefUnwindSafe for SchemaAwareRouter
impl Send for SchemaAwareRouter
impl Sync for SchemaAwareRouter
impl Unpin for SchemaAwareRouter
impl UnsafeUnpin for SchemaAwareRouter
impl !UnwindSafe for SchemaAwareRouter
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
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>
Converts
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>
Converts
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