Documentation
¶
Index ¶
- Variables
- func MiddlewarePanicRecovery(next fasthttp.RequestHandler) fasthttp.RequestHandler
- func MiddlewareZerolog(next fasthttp.RequestHandler) fasthttp.RequestHandler
- func NewServer(handler fasthttp.RequestHandler) *fasthttp.Server
- func RunServer(lc fx.Lifecycle, slc *Lifecycle)
- type Lifecycle
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("xfasthttp", fx.Supply( NewServerConfig(), ), fx.Provide( NewServer, NewLifecycle, ), fx.Invoke( RunServer, ), )
Functions ¶
func MiddlewarePanicRecovery ¶
func MiddlewarePanicRecovery(next fasthttp.RequestHandler) fasthttp.RequestHandler
мидлвара для отлова паники и логирования через zerolog
func MiddlewareZerolog ¶
func MiddlewareZerolog(next fasthttp.RequestHandler) fasthttp.RequestHandler
FasthttpZerolog — логгирующая мидлвара для fasthttp
Types ¶
type Lifecycle ¶
type Lifecycle struct {
// contains filtered or unexported fields
}
func NewLifecycle ¶
func NewLifecycle(srv *fasthttp.Server, cfg *ServerConfig) *Lifecycle
type ServerConfig ¶
type ServerConfig struct {
Addr string
}
func NewServerConfig ¶
func NewServerConfig() *ServerConfig
Click to show internal directories.
Click to hide internal directories.