1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Standard gRPC health service (`grpc.health.v1`) wiring.
//!
//! RLMesh servers bind their listener up front (see the bind-first
//! `BoundEnvServer` / `BoundModelServer` paths), so by the time the health
//! service is registered the socket is already accepting connections. We
//! therefore mark the overall server health as `SERVING` immediately and hand
//! back the ready-to-add tonic service.
//!
//! The signal is the standard `grpc.health.v1.Health` service — no
//! rlmesh-specific protocol surface is added. Supervisors and probes can issue
//! `Check`/`Watch` against the empty (overall) service name and observe
//! `SERVING` once the listener is up.
use ServingStatus;
use HealthServer;
use ;
/// Build a `grpc.health.v1` health service with the overall server health
/// already marked `SERVING`, ready to add to a tonic `Server::builder()`.
///
/// The returned [`HealthReporter`] is handed back so callers may flip the
/// status to `NotServing` during drain/shutdown if they wish; RLMesh keeps the
/// service always-on and does not currently downgrade it.
pub async