pub struct ServiceRegistry { /* private fields */ }Expand description
Plugin-based service registry
Implementations§
Source§impl ServiceRegistry
impl ServiceRegistry
Sourcepub fn with_default_plugins(self) -> Self
pub fn with_default_plugins(self) -> Self
Initialize default plugins
Sourcepub fn register_plugin(&mut self, plugin: Box<dyn ServicePlugin>)
pub fn register_plugin(&mut self, plugin: Box<dyn ServicePlugin>)
Register a service plugin
Sourcepub async fn start_service(
&mut self,
service_name: &str,
) -> Result<ServiceHandle>
pub async fn start_service( &mut self, service_name: &str, ) -> Result<ServiceHandle>
Start a service by name
Sourcepub async fn stop_service(&mut self, handle_id: &str) -> Result<()>
pub async fn stop_service(&mut self, handle_id: &str) -> Result<()>
Stop a service by handle ID
Sourcepub async fn check_all_health(&self) -> HashMap<String, HealthStatus>
pub async fn check_all_health(&self) -> HashMap<String, HealthStatus>
Check health of all services
Sourcepub fn active_services(&self) -> &HashMap<String, ServiceHandle>
pub fn active_services(&self) -> &HashMap<String, ServiceHandle>
Get all active service handles
Sourcepub fn is_service_running(&self, service_name: &str) -> bool
pub fn is_service_running(&self, service_name: &str) -> bool
Check if service is running
Trait Implementations§
Source§impl Debug for ServiceRegistry
impl Debug for ServiceRegistry
Source§impl Default for ServiceRegistry
impl Default for ServiceRegistry
Source§fn default() -> ServiceRegistry
fn default() -> ServiceRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ServiceRegistry
impl !RefUnwindSafe for ServiceRegistry
impl Send for ServiceRegistry
impl Sync for ServiceRegistry
impl Unpin for ServiceRegistry
impl !UnwindSafe for ServiceRegistry
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request