Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownRequest = errorx.Internal("KERNEL_PANIC_RECOVERED", "unknown request error")
ErrUnknownRequest is unknown request error.
Functions ¶
func Recovery ¶
func Recovery(opts ...Option) middleware.Middleware
Recovery is a server middleware that recovers from any panics.
Types ¶
type HandlerFunc ¶
HandlerFunc is recovery handler func.
type Option ¶
type Option func(*options)
Option is recovery option.
func WithLogger ¶
WithLogger sets the logger used to record recovered panics. Defaults to slog.Default.
Click to show internal directories.
Click to hide internal directories.