recuperate

package module
v0.0.0-...-9b1b795 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoSafe

func GoSafe(f func())

func GoroutineNotPanic

func GoroutineNotPanic(handlers ...func() error) (err []error)

func Recover

func Recover()

Types

type Panic

type Panic struct {
	R     interface{} // recover() 返回值
	Stack []byte      // 当时的调用栈
}

func (Panic) String

func (p Panic) String() string

type PanicGroup

type PanicGroup struct {
	Func func(msg string) // 处理报错信息
	// contains filtered or unexported fields
}

func NewPanicGroup

func NewPanicGroup() *PanicGroup

func (*PanicGroup) Go

func (g *PanicGroup) Go(f func()) *PanicGroup

func (*PanicGroup) Wait

func (g *PanicGroup) Wait(ctx context.Context) error

func (*PanicGroup) WithFunc

func (g *PanicGroup) WithFunc(f func(msg string)) *PanicGroup

Jump to

Keyboard shortcuts

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