Documentation ¶
Overview ¶
Package unpanic provides htadaptor.Middleware that gracefully recovers from request panics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(lastResort http.Handler) htadaptor.Middleware
New returns middleware that prevents service shutdown by recovering from panics. Then, it logs the recovery value and runs lastResort http.Handler. If lastResort is <nil> the service will panic again and shutdown.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.