recovery

package
v0.0.0-...-6f3959b Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recovery

func Recovery(inner http.Handler) http.Handler

Recovery is a factory method for SimpleRecovery

func WithStackTrace

func WithStackTrace(inner http.Handler) http.Handler

WithStackTrace is a factory method for RecoveryWithStackTrace

Types

type SimpleRecovery

type SimpleRecovery struct {
}

SimpleRecovery is a an http.Handler that only reports a 500 status code without rendering the stacktrace.

func (*SimpleRecovery) ServeHTTP

func (recovery *SimpleRecovery) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.Handler)

ServeHTTP is the implementation of the standard http.Handler interface that will only report a Internal Server Error

type StackTraceRecovery

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

StackTraceRecovery is intended for development and renders a stacktrace of where the panic occurred.

func (*StackTraceRecovery) ServeHTTP

func (recovery *StackTraceRecovery) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.Handler)

ServeHTTP is the implementation of the standard http.Handler interface that will render a stacktrace.

Jump to

Keyboard shortcuts

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