Documentation
¶
Index ¶
- func BaseMiddleware(isProduction bool, log *zap.Logger) []func(http.Handler) http.Handler
- func Demux(state uint32, r chi.Router) *demux
- func LogRequest(next http.Handler) http.Handler
- func LogResponse(next http.Handler) http.Handler
- func New(log *zap.Logger, envOpt options.EnvironmentOpt, httpOpt options.HttpServerOpt, ...) *server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseMiddleware ¶
func LogRequest ¶
LogRequest middleware logs request details
It uses logger from context, see contextLogger()
func LogResponse ¶
LogResponse middleware logs response details
It uses logger from context, see contextLogger()
func New ¶
func New(log *zap.Logger, envOpt options.EnvironmentOpt, httpOpt options.HttpServerOpt, waitForOpt options.WaitForOpt, searcherOpt options.SearcherOpt) *server
New initializes new HTTP server with special powers Server is started as early as possible and with a special request handler that demultiplexes request to one of the configured routers according to the server state.
Waiting state This is initial state that with some simple route handlers:
- /version
- /healthcheck
- /healthcheck
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.