F-06: HTTP server + middleware (bookshelf-qqz.6) #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bd-bookshelf-qqz.6"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
internal/httpserver.NewServerwith production-ready timeouts (Read: 5s, Write: 10s, Idle: 120s) and BaseContext wiring for graceful shutdowninternal/middlewarepackage: TraceID → RequestLogger → MetricsRecorder → ErrorMapper → Recoverer composable chaininternal/handler.WantsJSONcontent-negotiation helpercmd/bookshelf/main.gowith/healthz,/metrics, andGET /(HTML or JSON based on Accept)Test plan
go vet ./...— cleango test -race ./internal/...— all passmake coverage— 100% on internal/httpserver, internal/middleware, internal/handlerCloses bead bookshelf-qqz.6 on merge.