pub struct HealthReporter { /* private fields */ }
Expand description
A handle providing methods to update the health status of gRPC services. A
HealthReporter
is connected to a HealthServer
which serves the statuses
over the grpc.health.v1.Health
service.
Implementations§
source§impl HealthReporter
impl HealthReporter
sourcepub async fn set_service_status<S>(
&mut self,
service_name: S,
status: ServingStatus,
)
pub async fn set_service_status<S>( &mut self, service_name: S, status: ServingStatus, )
Sets the status of the service with service_name
to status
. This notifies any watchers
if there is a change in status.
sourcepub async fn clear_service_status(&mut self, service_name: &str)
pub async fn clear_service_status(&mut self, service_name: &str)
Clear the status of the given service.
Trait Implementations§
source§impl Clone for HealthReporter
impl Clone for HealthReporter
source§fn clone(&self) -> HealthReporter
fn clone(&self) -> HealthReporter
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for HealthReporter
impl !RefUnwindSafe for HealthReporter
impl Send for HealthReporter
impl Sync for HealthReporter
impl Unpin for HealthReporter
impl !UnwindSafe for HealthReporter
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> 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> 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