Help us shape the future of Go! Take the 2026 Go Developer Survey

fasthttputil

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestCtxDebug

func RequestCtxDebug(ctx *fasthttp.RequestCtx, log *zap.Logger, payloadDetail bool)

RequestCtxDebug log all requestCtx field

func RequestDebug

func RequestDebug(req *fasthttp.Request, log *zap.Logger, payloadDetail bool)

RequestDebug log request all field

func ResponseDebug

func ResponseDebug(resp *fasthttp.Response, log *zap.Logger, payloadDetail bool)

ResponseDebug log response all field

func Tid

func Tid(ctx *fasthttp.RequestCtx) string

Tid fast http connect id

Types

type FastDebug

type FastDebug struct {
	// contains filtered or unexported fields
}

FastDebug fast http

func New

func New(opts ...FastDebugOptions) *FastDebug

NewZapLogger init a log

func (*FastDebug) RequestCtxDebug

func (s *FastDebug) RequestCtxDebug(ctx *fasthttp.RequestCtx)

RequestCtxDebug log all requestCtx field

func (*FastDebug) RequestDebug

func (s *FastDebug) RequestDebug(req *fasthttp.Request)

RequestDebug log request all field

func (*FastDebug) ResponseDebug

func (s *FastDebug) ResponseDebug(resp *fasthttp.Response)

ResponseDebug log response all field

type FastDebugOptions

type FastDebugOptions func(*FastDebug)

ZapLoggerOption options

func WithDebug

func WithDebug() FastDebugOptions

WithDebug set debug

func WithLog

func WithLog(log *zap.Logger) FastDebugOptions

WithDebug set debug

Jump to

Keyboard shortcuts

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