Documentation
¶
Index ¶
- func EnablePProfOnDebugMode(conf config.HttpServerConf, r *gin.Engine)
- func InitGinEngine(conf config.HttpServerConf) *gin.Engine
- func RunHttpServer(conf config.HttpServerConf, ginEngine *gin.Engine, apiOption *api.Option, ...)
- func RunPrometheusServerWhenEnable(conf config.PrometheusConf)
- func RunSwaggerServerWhenEnable(conf config.SwaggerConf, ginEngine *gin.Engine)
- func WrapWebsocketHandler(ws *websocket.Conn, handler func(ws *websocket.Conn)) func(ginContext *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnablePProfOnDebugMode ¶
func EnablePProfOnDebugMode(conf config.HttpServerConf, r *gin.Engine)
EnablePProfOnDebugMode 启动pprof检测
func InitGinEngine ¶
func InitGinEngine(conf config.HttpServerConf) *gin.Engine
InitGinEngine 初始化gin引擎
Note: ¶
该方法会默认使用 middleware.LogTrace 中间件
func RunHttpServer ¶
func RunHttpServer(conf config.HttpServerConf, ginEngine *gin.Engine, apiOption *api.Option, wg *sync.WaitGroup)
RunHttpServer 启动http服务
func RunPrometheusServerWhenEnable ¶ added in v3.0.2
func RunPrometheusServerWhenEnable(conf config.PrometheusConf)
RunPrometheusServerWhenEnable 启动prometheus指标收集服务
当配置文件指明启用时才会启动
func RunSwaggerServerWhenEnable ¶ added in v3.0.2
func RunSwaggerServerWhenEnable(conf config.SwaggerConf, ginEngine *gin.Engine)
RunSwaggerServerWhenEnable 启动swagger文档服务
当配置文件指明启用时才会启动
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.