panichandler

package
v0.0.0-...-ec7f410 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2014 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

Package panichandler provides An HTTP decorator which recovers from `panic`

Index

Constants

View Source
const LogFormat = `` /* 294-byte string literal not displayed */

Variables

This section is empty.

Functions

func DefaultRecoveryHandler

func DefaultRecoveryHandler(rw http.ResponseWriter, r *http.Request, panicErr interface{})

Types

type PanicHandler

type PanicHandler struct {
	// contains filtered or unexported fields
}

func Decorate

func Decorate(recovery RecoveryHandlerFunc, logger *log.Logger, delegate http.Handler) *PanicHandler

func (PanicHandler) ServeHTTP

func (lh PanicHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type RecoveryHandlerFunc

type RecoveryHandlerFunc func(http.ResponseWriter, *http.Request, interface{})

Jump to

Keyboard shortcuts

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