pub struct HealthService { /* private fields */ }Expand description
Health service wrapper for xDS server.
Provides gRPC health checking protocol support with service-level health status management.
Implementations§
Source§impl HealthService
impl HealthService
Sourcepub fn new() -> (Self, HealthServer<impl Health>)
pub fn new() -> (Self, HealthServer<impl Health>)
Create a new health service and return both the wrapper and the tonic service.
The returned tuple contains:
HealthService- wrapper for managing health status- The health server that can be added to a tonic router
Sourcepub async fn set_serving(&self, service_name: &str)
pub async fn set_serving(&self, service_name: &str)
Set a service as serving (healthy).
Sourcepub async fn set_not_serving(&self, service_name: &str)
pub async fn set_not_serving(&self, service_name: &str)
Set a service as not serving (unhealthy).
Sourcepub async fn set_unknown(&self, service_name: &str)
pub async fn set_unknown(&self, service_name: &str)
Set a service status to unknown.
Sourcepub async fn set_all_serving(&self)
pub async fn set_all_serving(&self)
Set all xDS services as serving.
Sourcepub async fn set_all_not_serving(&self)
pub async fn set_all_not_serving(&self)
Set all xDS services as not serving (for graceful shutdown).
Sourcepub const fn xds_service_names() -> &'static [&'static str]
pub const fn xds_service_names() -> &'static [&'static str]
Get the list of xDS service names for health checking.
This returns the standard Envoy xDS service names plus a generic “xds” entry. These names match the gRPC service names used by Envoy clients.
Trait Implementations§
Source§impl Clone for HealthService
impl Clone for HealthService
Auto Trait Implementations§
impl !RefUnwindSafe for HealthService
impl !UnwindSafe for HealthService
impl Freeze for HealthService
impl Send for HealthService
impl Sync for HealthService
impl Unpin for HealthService
impl UnsafeUnpin for HealthService
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> 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