refactors HTTP server initialization, improves logging middleware, and updates documentation (#1)
Reviewed-on: #1
This commit is contained in:
@@ -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,
|
||||
) {
|
||||
|
Reference in New Issue
Block a user