Expand description
nido-svc-common — shared building blocks for nido-*-svc crates.
Eliminates the ~150 LOC of duplicated boilerplate in each of the 13 daily-companion services (health handler, OpenAPI spec builder, RFC 7807 error type, SSE keepalive wrapper, tower middleware stack, and rand ID).
§Usage
use nido_svc_common::{
error::NidoSvcError,
health::health_router,
middleware::apply_middleware_stack,
openapi::{OpenApiSpec, RouteSpec},
rand::rand_id,
sse::sse_with_keepalive,
};Modules§
- error
- RFC 7807 problem-JSON error type for nido-*-svc crates.
- health
- Generic
/healthhandler for nido-*-svc crates. - middleware
- Canonical tower middleware stack for nido-*-svc crates.
- openapi
- Hand-rolled minimal OpenAPI 3.1.0 spec builder.
- rand
- Collision-resistant local-volume ID generation.
- sse
- SSE keepalive wrapper — Cilium-mandatory 15s interval.