unpanic

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL