Add loopback health and Prometheus metrics endpoint
All checks were successful
CI / check (push) Successful in 4m22s

This commit is contained in:
Jean Chevronnet 2026-07-19 04:13:18 +00:00
parent 381f706634
commit ad8a3fe065
No known key found for this signature in database
6 changed files with 180 additions and 0 deletions

View file

@ -6,6 +6,7 @@ mod dict;
mod engine;
mod gossip;
mod grpc;
mod health;
mod jsonrpc;
mod keycard;
mod link;
@ -252,6 +253,11 @@ async fn main() -> Result<()> {
tokio::spawn(jsonrpc::run(engine.clone(), jsonrpc_cfg));
}
// Liveness + Prometheus metrics endpoint (plain HTTP, localhost).
if let Some(health_cfg) = cfg.health.clone() {
tokio::spawn(health::run(engine.clone(), health_cfg));
}
// Periodically fold log churn into a snapshot when it grows past the accounts.
{
let engine = engine.clone();