pub struct ServiceCollector { /* private fields */ }Expand description
Service registry that provides service statuses
This registry stores ServiceInfo entries and can convert them to ServiceStatus.
Implementations§
Source§impl ServiceCollector
impl ServiceCollector
Sourcepub async fn values(&self) -> Vec<ServiceInfo>
pub async fn values(&self) -> Vec<ServiceInfo>
Get all service info values
Sourcepub async fn insert(&self, key: String, value: ServiceInfo)
pub async fn insert(&self, key: String, value: ServiceInfo)
Insert a service info entry
Sourcepub async fn get(&self, key: &str) -> Option<ServiceInfo>
pub async fn get(&self, key: &str) -> Option<ServiceInfo>
Get a service info entry by key
Sourcepub async fn remove(&self, key: &str) -> Option<ServiceInfo>
pub async fn remove(&self, key: &str) -> Option<ServiceInfo>
Remove a service info entry by key
Sourcepub async fn all_statuses(&self) -> Vec<ServiceStatus>
pub async fn all_statuses(&self) -> Vec<ServiceStatus>
Get all service statuses as proto ServiceStatus
Converts all ServiceInfo entries to ServiceStatus using the From trait.
Sourcepub async fn all_values(&self) -> Vec<ServiceInfo>
pub async fn all_values(&self) -> Vec<ServiceInfo>
Get all values directly (returns ServiceInfo)
Trait Implementations§
Source§impl Clone for ServiceCollector
impl Clone for ServiceCollector
Source§fn clone(&self) -> ServiceCollector
fn clone(&self) -> ServiceCollector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceCollector
impl Debug for ServiceCollector
Auto Trait Implementations§
impl !RefUnwindSafe for ServiceCollector
impl !UnwindSafe for ServiceCollector
impl Freeze for ServiceCollector
impl Send for ServiceCollector
impl Sync for ServiceCollector
impl Unpin for ServiceCollector
impl UnsafeUnpin for ServiceCollector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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::Request