Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultResponseInterceptor ¶
func SetDefaultResponseInterceptor(r Recorder)
SetDefaultResponseInterceptor for http handler response
Types ¶
type Middleware ¶
type Middleware func(next gin.HandlerFunc) gin.HandlerFunc
Middleware is a chainable preprocessor for Endpoint
func RecoverWithTrace ¶
func RecoverWithTrace(name string) Middleware
RecoverWithTrace middleware is a RecoverMiddleware wraps with a trace handler
func (Middleware) HandlerFunc ¶
func (m Middleware) HandlerFunc(next gin.HandlerFunc) gin.HandlerFunc
HandlerFunc will return the HandlerFunc of the middleware
type Recorder ¶
type Recorder interface {
Record(ctx context.Context, statistics Statistics)
}
Recorder for http handler response status & body size
func NewMultiRecorder ¶
NewMultiRecorder will chain MultiRecorder
type Statistics ¶
Statistics for http handler response
Click to show internal directories.
Click to hide internal directories.