Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CfgGin = fx.Invoke(func(lifecycle fx.Lifecycle, g *gin.Engine, cfg *conf.Config) { httpServer := http.Server{ Addr: cfg.ListenAddr, Handler: g, } lifecycle.Append(fx.Hook{ OnStart: func(ctx context.Context) error { go func() { if cfg.Debug { ginpprof.Wrap(g) } err := httpServer.ListenAndServe() if err != nil { panic(err) } }() return nil }, OnStop: func(ctx context.Context) error { return httpServer.Shutdown(ctx) }, }) })
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.