plexus_registry/lib.rs
1//! Registry - Backend discovery and registration service for Plexus hubs
2//!
3//! This crate provides a standalone registry service that enables dynamic
4//! discovery of Plexus backend instances. Multiple Synapse clients can
5//! discover and connect to different Plexus hubs without manual configuration.
6//!
7//! # Architecture
8//!
9//! The registry stores backend connection information in SQLite and can be
10//! configured via TOML files. It implements the Activation trait from hub-core
11//! and can be hosted via hub-transport.
12//!
13//! # Example
14//!
15//! ```rust,no_run
16//! use plexus_registry::Registry;
17//! use plexus_core::plexus::DynamicHub;
18//! use std::sync::Arc;
19//!
20//! # async fn example() {
21//! let registry = Registry::with_defaults().await.unwrap();
22//! let plexus = Arc::new(DynamicHub::new("registry").register(registry));
23//! # }
24//! ```
25
26pub mod activation;
27pub mod storage;
28pub mod types;
29
30// Re-export plexus module for plexus_macros compatibility
31// The hub_methods macro expects crate::plexus::* to be available
32pub mod plexus {
33 pub use plexus_core::plexus::*;
34 pub use plexus_core::types::Handle;
35}
36
37// Re-export serde helpers for macro-generated code
38// This allows the hub_methods macro to reference serde helpers via crate::serde_helpers
39pub use plexus_core::serde_helpers;
40
41pub use activation::Registry;
42pub use types::{BackendInfo, BackendSource, RegistryEvent, RegistryStorageConfig};