debugger

package
v3.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package debugger 提供测试和性能测试相关的中间件

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debugger

type Debugger struct {
	// Pprof 设置了 net/http/pprof 中与性能测试相关的页面地址前缀
	//
	// 如果此值为空,则表示不会启用这些功能。
	Pprof string

	// Vars 设置了 expvar 中相关的测试数据项地址
	//
	// 如果此值为空,则表示不会启用这些功能。
	Vars string
}

Debugger 用于调试的中间件

func (*Debugger) Middleware

func (dbg *Debugger) Middleware(next http.Handler) http.Handler

Middleware 将当前中间件应用于 next

func (*Debugger) MiddlewareFunc

func (dbg *Debugger) MiddlewareFunc(next func(http.ResponseWriter, *http.Request)) http.Handler

MiddlewareFunc 将当前中间件应用于 next

Jump to

Keyboard shortcuts

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