nido-svc-common
Shared HTTP-service primitives for the nido-*-svc family: health probes, an
RFC 7807 error type, OpenAPI spec building, server-sent-event helpers, and a
composable middleware stack.
Install
[]
= "0.1"
What's inside
health::health_router(name, version)— a ready-to-mergeGET /healthaxum router.error::NidoSvcError— athiserrorenum implementing axumIntoResponseas RFC 7807 problem JSON (NotFound,InvalidArgument,Unauthorized,Internal).openapi::OpenApiSpec— a small builder that emits an OpenAPI document and aGEThandler for it.sse::sse_with_keepalive(...)— server-sent-event streams with keep-alive.middleware— a composabletower-httpstack (compression, trace, request-id, CORS, timeout, sensitive-headers).
Usage
use Router;
use health_router;
let app: Router = new
.merge;
Why a separate crate?
Every nido-*-svc microservice needs the same health / error / OpenAPI / SSE
scaffolding. Extracting it here keeps each service crate thin and prevents the
scaffolding from drifting between services.
License
Dual-licensed under MIT or Apache 2.0 at your choice. Inherited from the workspace root.
Related crates in the nido ecosystem
nido-output-contract— thenido.output.v1JSON envelope helper.nido— the operator CLI.
See securanido.com for the broader project.