Expand description
HTTP API server for DocSpec document conversion.
Re-exports§
pub use cli::Args;pub use server::serve;pub use server::ServerError;
Modules§
- cache
- Cache-Control middleware for all HTTP responses.
- cli
- Command-line interface arguments for the
docspec-httpserver binary. - error
- Error types for the HTTP server.
- format
- MIME type and HTTP header constants for the conversion API.
- handlers
- HTTP request handlers.
- metrics
- Prometheus metrics for the
docspec-httpserver. - mime_
parser - HTTP
Acceptnegotiation andContent-Typevalidation for the conversion API. - router
- HTTP router and route definitions.
- server
- HTTP server implementation.
- telemetry
- Telemetry facade. Currently wraps Sentry. Designed for extraction to
docspec-telemetrywhen (a) OpenTelemetry is added, OR (b)docspec-cliwants Sentry, OR (c) Prometheus metrics land. Keep the public API surface stable and free of HTTP-specific types. - tracing_
init - Tracing subscriber initialization.
Functions§
- init_
telemetry - Initialize Sentry (if DSN env var set) and return a guard that flushes Sentry on drop.
MUST be called BEFORE building the tokio runtime;
main()MUST hold the returned guard for the entire process lifetime. - init_
tracing - Initialize the global tracing subscriber. Called internally by
run_server. - run_
server - Synchronous server entrypoint. Builds a multi-threaded tokio runtime, installs the global tracing subscriber, and runs the HTTP server until SIGINT/SIGTERM.