pub struct SidecarRegistry { /* private fields */ }Expand description
Central registry of all sidecars (thread-safe).
Implementations§
Source§impl SidecarRegistry
impl SidecarRegistry
Sourcepub fn new() -> SidecarRegistry
pub fn new() -> SidecarRegistry
Create an empty registry.
Sourcepub fn register(&self, config: SidecarConfig)
pub fn register(&self, config: SidecarConfig)
Register a sidecar config (does not connect — call lifecycle::connect after).
Sourcepub fn get(&self, name: &str) -> Option<Ref<'_, String, SidecarEntry>>
pub fn get(&self, name: &str) -> Option<Ref<'_, String, SidecarEntry>>
Get a reference to a sidecar entry.
Sourcepub fn get_mut(&self, name: &str) -> Option<RefMut<'_, String, SidecarEntry>>
pub fn get_mut(&self, name: &str) -> Option<RefMut<'_, String, SidecarEntry>>
Get a mutable reference to a sidecar entry.
Sourcepub fn remove(&self, name: &str) -> Option<SidecarEntry>
pub fn remove(&self, name: &str) -> Option<SidecarEntry>
Remove a sidecar from the registry.
Sourcepub fn status_list(&self) -> Vec<(String, SidecarHealth)>
pub fn status_list(&self) -> Vec<(String, SidecarHealth)>
List sidecars with their health status.
Sourcepub fn healthy_sidecars(&self) -> Vec<String>
pub fn healthy_sidecars(&self) -> Vec<String>
Get all healthy sidecar names.
Sourcepub fn find_by_method(&self, method: &str) -> Option<String>
pub fn find_by_method(&self, method: &str) -> Option<String>
Find a sidecar that supports the given method.
Sourcepub fn prometheus_metrics(&self) -> String
pub fn prometheus_metrics(&self) -> String
Aggregate Prometheus metrics for all sidecars.
Trait Implementations§
Source§impl Default for SidecarRegistry
impl Default for SidecarRegistry
Source§fn default() -> SidecarRegistry
fn default() -> SidecarRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SidecarRegistry
impl !RefUnwindSafe for SidecarRegistry
impl Send for SidecarRegistry
impl Sync for SidecarRegistry
impl Unpin for SidecarRegistry
impl UnsafeUnpin for SidecarRegistry
impl !UnwindSafe for SidecarRegistry
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