handler

package
v1.6.40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPrefix url prefix of pprof
	DefaultPrefix = "/debug/pprof"
)

Variables

This section is empty.

Functions

func ExpHandler

func ExpHandler(ctx *gin.Context)

ExpHandler 返回当前运行信息

func GoVersion

func GoVersion() interface{}

当前 Golang 版本

func PProfRegister

func PProfRegister(r *gin.Engine, prefixOptions ...string)

Register the standard HandlerFuncs from the net/http/pprof package with the provided gin.Engine. prefixOptions is a optional. If not prefixOptions, the default path prefix is used, otherwise first prefixOptions will be path prefix.

func PrometheusHandler

func PrometheusHandler(ctx *gin.Context, name string)

func RouteRegister

func RouteRegister(rg *gin.RouterGroup, prefixOptions ...string)

RouteRegister the standard HandlerFuncs from the net/http/pprof package with the provided gin.GrouterGroup. prefixOptions is a optional. If not prefixOptions, the default path prefix is used, otherwise first prefixOptions will be path prefix.

func StatsHandler

func StatsHandler(ctx *gin.Context)

func SwagHandler

func SwagHandler(ctx *gin.Context)

func WithExpVar added in v1.5.0

func WithExpVar() option.App

func WithHealth added in v1.5.0

func WithHealth() option.App

func WithNoRoute added in v1.5.0

func WithNoRoute() option.App

func WithPProf added in v1.5.0

func WithPProf() option.App

func WithPing added in v1.5.0

func WithPing() option.App

func WithPrometheus added in v1.5.0

func WithPrometheus() option.App

func WithRootPath added in v1.5.0

func WithRootPath() option.App

func WithStats added in v1.5.0

func WithStats(acts gin.Accounts) option.App

func WithSwagger added in v1.5.0

func WithSwagger() option.App

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL