MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / register

Method register

graphlite/src/catalog/registry.rs:59–67  ·  view source on GitHub ↗

Register a new catalog provider Adds a catalog provider to the registry and initializes it with the storage manager. If initialization fails, the catalog is still registered but may not function properly. # Arguments `name` - Unique name for the catalog `catalog` - Boxed catalog provider implementation

(&mut self, name: &str, mut catalog: Box<dyn CatalogProvider>)

Source from the content-addressed store, hash-verified

57 /// * `name` - Unique name for the catalog
58 /// * `catalog` - Boxed catalog provider implementation
59 pub fn register(&mut self, name: &str, mut catalog: Box<dyn CatalogProvider>) {
60 // Initialize the catalog with storage reference
61 if let Err(e) = catalog.init(self.storage.clone()) {
62 log::warn!("Failed to initialize catalog '{}': {}", name, e);
63 }
64
65 self.catalogs.insert(name.to_string(), catalog);
66 log::info!("Registered catalog provider: {}", name);
67 }
68
69 /// Get immutable reference to a catalog provider
70 ///

Callers 1

register_all_catalogsFunction · 0.45

Calls 3

cloneMethod · 0.80
initMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected