wrapgo

package
v0.0.0-...-028f1de Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallDefaultPanicHandler

func CallDefaultPanicHandler(payload interface{}, stack []byte)

CallDefaultPanicHandler calls set defaultPanicHandler function as wrapper

func CallWithDefaultPanicHandler

func CallWithDefaultPanicHandler(f func())

CallWithPanicHandler call f with panic handler

func CallWithPanicHandler

func CallWithPanicHandler(f func(), handler PanicHandler)

CallWithPanicHandler call f with panic handler

func GoWithDefaultPanicHandler

func GoWithDefaultPanicHandler(f func())

GoWithDefaultPanicHandler initiate goroutine with default panic handler

func GoWithPanicHandler

func GoWithPanicHandler(f func(), handler PanicHandler)

GoWithPanicHandler initiate goroutine with panic handler

Types

type PanicHandler

type PanicHandler func(interface{}, []byte)

PanicHandler is used in wrapped goroutine initiation

func SetDefaultPanicHandler

func SetDefaultPanicHandler(handler PanicHandler) PanicHandler

SetDefaultPanicHandler sets default panic handler for GoWithDefaultPanicHandler. It should be called at initialization only once.

Jump to

Keyboard shortcuts

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