recover

package
v0.0.0-...-4a0794a Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*RecoverManager) error

Option is the option of RecoverManager.

func FallbackHandler

func FallbackHandler(fallbackHandler jimu.FallbackHandler) Option

FallbackHandler set the FallbackHandler for RecoverManager.

func LoggerGetter

func LoggerGetter(loggerGetter jimu.LoggerGetter) Option

LoggerGetter set the LoggerGetter for RecoverManager. (required)

type RecoverManager

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

RecoverManager recover from panic.

func New

func New() *RecoverManager

New creates RecoverManager.

func (*RecoverManager) Configure

func (m *RecoverManager) Configure() error

Configure the manager. Options are not allowed to add after configure.

func (*RecoverManager) Options

func (m *RecoverManager) Options(options ...Option)

Options add options to the manager.

func (*RecoverManager) Wrap

func (m *RecoverManager) Wrap(next http.Handler) http.Handler

Wrap is the middleware.

Jump to

Keyboard shortcuts

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