docs(httpserver): correct tier from 4 to 3
httpserver depends on launcher (Tier 2), placing it at Tier 3. With launcher corrected from Tier 5 to Tier 2, httpserver's tier drops accordingly.
This commit is contained in:
19
doc.go
Normal file
19
doc.go
Normal file
@@ -0,0 +1,19 @@
|
||||
// Package httpserver provides a lifecycle-managed HTTP server built on chi.
|
||||
//
|
||||
// It implements [launcher.Component] so it integrates directly with the launcher
|
||||
// lifecycle (OnInit → OnStart → OnStop). It also embeds [chi.Router], giving callers
|
||||
// the full chi routing API: Get, Post, Route, Mount, Use, etc.
|
||||
//
|
||||
// No middleware is installed by default. Compose your stack with [WithMiddleware]:
|
||||
//
|
||||
// srv := httpserver.New(logger, cfg,
|
||||
// httpserver.WithMiddleware(
|
||||
// httpmw.Recover(),
|
||||
// httpmw.CORS([]string{"*"}),
|
||||
// httpmw.RequestID(uuid.NewString),
|
||||
// httpmw.RequestLogger(logger),
|
||||
// ),
|
||||
// )
|
||||
// srv.Get("/health", healthHandler)
|
||||
// srv.Route("/api/v1", func(r chi.Router) { ... })
|
||||
package httpserver
|
||||
Reference in New Issue
Block a user