refactors HTTP server initialization, improves logging middleware, and updates documentation (#1)

Reviewed-on: #1
This commit is contained in:
2025-08-24 15:50:34 +00:00
parent 92e78f533a
commit cb0c87d200
2 changed files with 27 additions and 10 deletions

View File

@@ -1,3 +1,6 @@
// Package http provides functionality for setting up and managing HTTP servers.
// It includes features for health checks, Prometheus metrics, OpenTelemetry
// tracing, and custom middleware integration.
package http
import (
@@ -133,8 +136,8 @@ func prepHTTPServer(opts *opts.AppHTTP) *http.Server {
}
}
// Returns a shutdown func and a done channel if the
// server aborts abnormally. Returns error on failure to start
// InitHTTPServer returns a shutdown func and a done channel if the
// server aborts abnormally. Returns error on failure to start.
func InitHTTPServer(opts *opts.AppHTTP) (
func(context.Context) error, <-chan any, error,
) {