pub struct DiscoveryRegistry { /* private fields */ }Expand description
Discovery registry - holds registered specs and search index
Implementations§
Source§impl DiscoveryRegistry
impl DiscoveryRegistry
Sourcepub fn register(
&mut self,
spec: DiscoverySpec,
replace: bool,
) -> RegistrationResult
pub fn register( &mut self, spec: DiscoverySpec, replace: bool, ) -> RegistrationResult
Register a discovery spec
Sourcepub fn unregister(&mut self, server_name: &str) -> bool
pub fn unregister(&mut self, server_name: &str) -> bool
Unregister a server
Sourcepub fn query(&self, query: &str, top_k: usize) -> Vec<ToolQueryResult>
pub fn query(&self, query: &str, top_k: usize) -> Vec<ToolQueryResult>
Query tools across all registered servers
Sourcepub fn similar(&self, tool_id: &str, top_k: usize) -> Vec<ToolQueryResult>
pub fn similar(&self, tool_id: &str, top_k: usize) -> Vec<ToolQueryResult>
Find tools similar to a given tool
Sourcepub fn list_servers(&self) -> Vec<ServerSummary>
pub fn list_servers(&self) -> Vec<ServerSummary>
List all registered servers
Sourcepub fn list_categories(&self) -> HashMap<String, CategorySummary>
pub fn list_categories(&self) -> HashMap<String, CategorySummary>
List all categories across all servers
Sourcepub fn index_stats(&self) -> Option<IndexStats>
pub fn index_stats(&self) -> Option<IndexStats>
Get index statistics
Sourcepub fn get_schema() -> Value
pub fn get_schema() -> Value
Get the discovery schema as JSON
Trait Implementations§
Source§impl Debug for DiscoveryRegistry
impl Debug for DiscoveryRegistry
Auto Trait Implementations§
impl Freeze for DiscoveryRegistry
impl RefUnwindSafe for DiscoveryRegistry
impl Send for DiscoveryRegistry
impl Sync for DiscoveryRegistry
impl Unpin for DiscoveryRegistry
impl UnwindSafe for DiscoveryRegistry
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> 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