Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Recovery ¶
type Recovery struct { // Core is the core functionality for plugins plugins.Core // OnRecover is the custom panic recovery function supplied by // the user. If OnRecover is nil, the plugin will just bubble the // panic up OnRecover func(rMsg interface{}, c *verto.Context) }
Recovery is a plugin that provides flexible, graceful panic recovery for web requests
func (*Recovery) Handle ¶
func (plugin *Recovery) Handle(c *verto.Context, next http.HandlerFunc)
Handle is called per web request to protect from program panics. If the OnRecover function is supplied on the plugin, OnRecover will be called to handle program panics. Otherwise, Handle will just bubble the panic up
Click to show internal directories.
Click to hide internal directories.