Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPanicRecover = errors.InternalServer("PANIC_RECOVER", "Panic recover error")
ErrPanicRecover is panic recover error.
Functions ¶
func Recovery ¶
func Recovery(opts ...Option) middleware.Middleware
Recovery is a server middleware that recovers from any panics.
Types ¶
type HandlerFunc ¶ added in v1.0.14
HandlerFunc is recovery handler func.
type Option ¶ added in v1.0.14
type Option func(*options)
Option is recovery option.
func WithDisablePrintStack ¶ added in v1.0.14
WithDisablePrintStack DisablePrintStack disables printing stack trace.
func WithDisableStackAll ¶ added in v1.0.14
WithDisableStackAll disables formatting stack traces of all other goroutines
func WithDisabled ¶ added in v1.0.14
WithDisabled set disabled recovery.
func WithHandler ¶ added in v1.0.14
func WithHandler(h HandlerFunc) Option
WithHandler with recovery handler.
func WithLogger ¶ added in v1.0.14
WithLogger with recovery logger.
func WithStackSize ¶ added in v1.0.14
WithStackSize with stack size.
Click to show internal directories.
Click to hide internal directories.