pub struct UdpHealthChecker { /* private fields */ }Expand description
Timer-driven, non-blocking UDP backend health prober. Owned by UdpProxy;
driven from the server event loop exactly like the HTTP HealthChecker
(poll once per iteration, ready(token) on owned readiness).
Implementations§
Source§impl UdpHealthChecker
impl UdpHealthChecker
pub fn new() -> Self
Sourcepub fn set_cluster(
&mut self,
cluster_id: &str,
settings: Option<UdpHealthSettings>,
registry: &Registry,
)
pub fn set_cluster( &mut self, cluster_id: &str, settings: Option<UdpHealthSettings>, registry: &Registry, )
Register (or replace) a cluster’s health settings. None removes them
(health disabled for that cluster). When removing, in-flight probes for
the cluster are deregistered from the mio registry before being
dropped — mirroring the completion path in Self::progress. Skipping
the deregister (as the old code did) leaked the probe fd’s registration
until the socket was eventually closed, and could leave a stale token
mapping in the poller.
Sourcepub fn remove_cluster(&mut self, cluster_id: &str, registry: &Registry)
pub fn remove_cluster(&mut self, cluster_id: &str, registry: &Registry)
Drop all state for a removed cluster, deregistering any in-flight probes.
Sourcepub fn owns_token(&self, token: Token) -> bool
pub fn owns_token(&self, token: Token) -> bool
Whether token falls in the reserved UDP-health namespace.