pub struct ServiceInfoCache { /* private fields */ }Expand description
Service information cache
Implementations§
Source§impl ServiceInfoCache
impl ServiceInfoCache
pub fn new() -> Self
Sourcepub fn get(
&self,
namespace: &str,
group_name: &str,
service_name: &str,
) -> Option<Service>
pub fn get( &self, namespace: &str, group_name: &str, service_name: &str, ) -> Option<Service>
Get service from cache
Sourcepub fn remove(
&self,
namespace: &str,
group_name: &str,
service_name: &str,
) -> Option<Service>
pub fn remove( &self, namespace: &str, group_name: &str, service_name: &str, ) -> Option<Service>
Remove service from cache
Sourcepub fn contains(
&self,
namespace: &str,
group_name: &str,
service_name: &str,
) -> bool
pub fn contains( &self, namespace: &str, group_name: &str, service_name: &str, ) -> bool
Check if service exists in cache
Sourcepub fn get_healthy_instances(
&self,
namespace: &str,
group_name: &str,
service_name: &str,
) -> Vec<Instance>
pub fn get_healthy_instances( &self, namespace: &str, group_name: &str, service_name: &str, ) -> Vec<Instance>
Get all healthy instances for a service
Sourcepub fn get_all_instances(
&self,
namespace: &str,
group_name: &str,
service_name: &str,
) -> Vec<Instance>
pub fn get_all_instances( &self, namespace: &str, group_name: &str, service_name: &str, ) -> Vec<Instance>
Get all instances for a service
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServiceInfoCache
impl !RefUnwindSafe for ServiceInfoCache
impl Send for ServiceInfoCache
impl Sync for ServiceInfoCache
impl Unpin for ServiceInfoCache
impl UnwindSafe for ServiceInfoCache
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> 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> 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