httphandler

package
v0.0.0-...-6a3b762 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: AGPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtHTTPHandler

type ExtHTTPHandler func(context.Context, *fasthttp.RequestCtx)

ExtHTTPHandler with general context param

type ExtHTTPSpyHandler

type ExtHTTPSpyHandler func(context.Context, *fasthttp.RequestCtx, personification.Person)

ExtHTTPSpyHandler with general context param and person

type HTTPHandlerWrapper

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

HTTPHandlerWrapper wraps extended HTTP handler to standart

func NewHTTPHandlerWrapper

func NewHTTPHandlerWrapper(
	prepareRequestCtx func(ctx *fasthttp.RequestCtx),
	newRequestCtx func(ctx *fasthttp.RequestCtx) context.Context,
	logger *zap.Logger,
) *HTTPHandlerWrapper

NewHTTPHandlerWrapper returns new wrapper object

func (*HTTPHandlerWrapper) HTTPHandler

HTTPHandler wraps default Ext HTTP handler

func (*HTTPHandlerWrapper) HTTPSpyHandler

HTTPSpyHandler wraps default Ext HTTP handler and personification

func (*HTTPHandlerWrapper) Metrics

func (wrp *HTTPHandlerWrapper) Metrics(name string, handler ExtHTTPHandler) fasthttp.RequestHandler

Metrics wraps default Ext HTTP handler with metrics

func (*HTTPHandlerWrapper) SpyMetrics

func (wrp *HTTPHandlerWrapper) SpyMetrics(name string, spy middleware.Spy, handler ExtHTTPSpyHandler) fasthttp.RequestHandler

SpyMetrics wraps default Ext HTTP handler with metrics and personification

Jump to

Keyboard shortcuts

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