pub struct RegistryService { /* private fields */ }Expand description
Service Registry
Manages registration, discovery, and lifecycle of extension services.
Implementations§
Source§impl RegistryService
impl RegistryService
Sourcepub fn with_heartbeat_timeout(self, secs: u64) -> Self
pub fn with_heartbeat_timeout(self, secs: u64) -> Self
Set heartbeat timeout
Sourcepub async fn register(
&self,
service: ExtensionService,
) -> Result<ServiceId, RegistryError>
pub async fn register( &self, service: ExtensionService, ) -> Result<ServiceId, RegistryError>
Register a new service
Sourcepub async fn unregister(
&self,
id: &ServiceId,
) -> Result<RegistrationInfo, RegistryError>
pub async fn unregister( &self, id: &ServiceId, ) -> Result<RegistrationInfo, RegistryError>
Unregister a service by ID
Sourcepub async fn get(&self, id: &ServiceId) -> Option<ExtensionService>
pub async fn get(&self, id: &ServiceId) -> Option<ExtensionService>
Get a service by ID
Sourcepub async fn get_by_name(&self, name: &str) -> Option<ExtensionService>
pub async fn get_by_name(&self, name: &str) -> Option<ExtensionService>
Get a service by name
Sourcepub async fn get_registration(&self, id: &ServiceId) -> Option<RegistrationInfo>
pub async fn get_registration(&self, id: &ServiceId) -> Option<RegistrationInfo>
Get service registration info by ID
Sourcepub async fn update_status(
&self,
id: &ServiceId,
status: ServiceStatus,
) -> Result<(), RegistryError>
pub async fn update_status( &self, id: &ServiceId, status: ServiceStatus, ) -> Result<(), RegistryError>
Update service status
Sourcepub async fn heartbeat(&self, id: &ServiceId) -> Result<(), RegistryError>
pub async fn heartbeat(&self, id: &ServiceId) -> Result<(), RegistryError>
Record a heartbeat for a service
Sourcepub async fn list_all(&self) -> Vec<ExtensionService>
pub async fn list_all(&self) -> Vec<ExtensionService>
List all services
Sourcepub async fn list(&self, filter: &ServiceFilter) -> Vec<ExtensionService>
pub async fn list(&self, filter: &ServiceFilter) -> Vec<ExtensionService>
List services matching a filter
Sourcepub async fn find_by_capability(
&self,
capability: &str,
) -> Vec<ExtensionService>
pub async fn find_by_capability( &self, capability: &str, ) -> Vec<ExtensionService>
Find services by capability
Sourcepub async fn stats(&self) -> RegistryStats
pub async fn stats(&self) -> RegistryStats
Get registry statistics
Sourcepub async fn health_check(&self) -> Vec<ServiceId>
pub async fn health_check(&self) -> Vec<ServiceId>
Check health of all services and update status
Trait Implementations§
Source§impl Debug for RegistryService
impl Debug for RegistryService
Auto Trait Implementations§
impl !RefUnwindSafe for RegistryService
impl !UnwindSafe for RegistryService
impl Freeze for RegistryService
impl Send for RegistryService
impl Sync for RegistryService
impl Unpin for RegistryService
impl UnsafeUnpin for RegistryService
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