Documentation
¶
Index ¶
- Variables
- func Call(callers ...errCaller) error
- func Goroutine(fn func())
- func GoroutineRecover(fn func(), callback func(reason interface{}))
- func HandleCrash(additionalHandlers ...func(interface{}))
- func HandlerError(err error, fn func(err error))
- func SetReallyCrash(really bool)
- func Shutdown(callback func())
- func WaitClose(stop <-chan struct{}, closeFunc ...func())
Constants ¶
This section is empty.
Variables ¶
View Source
var PanicHandlers = []func(interface{}){logPanic}
Functions ¶
func Call ¶
func Call(callers ...errCaller) error
Call 同步依次执行函数,只要有一个返回err,直接返回 通过此方法可以减少if err != nil { return }的判断
func GoroutineRecover ¶
func GoroutineRecover(fn func(), callback func(reason interface{}))
func HandleCrash ¶
func HandleCrash(additionalHandlers ...func(interface{}))
func HandlerError ¶
func SetReallyCrash ¶
func SetReallyCrash(really bool)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.