panics

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: ISC Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AfterFuncWrapperFunc

func AfterFuncWrapperFunc(log *logger.Logger) func(name string, d time.Duration, f func()) *time.Timer

AfterFuncWrapperFunc returns a time.AfterFunc wrapper function that handles panics.

func Exit

func Exit(log *logger.Logger, reason string)

Exit prints the given reason to log and initiates a clean shutdown.

func GoroutineWrapperFunc

func GoroutineWrapperFunc(log *logger.Logger) func(name string, spawnedFunction func())

GoroutineWrapperFunc returns a goroutine wrapper function that handles panics and writes them to the log.

func HandlePanic

func HandlePanic(log *logger.Logger, goroutineName string, goroutineStackTrace []byte)

HandlePanic recovers panics and then initiates a clean shutdown.

Types

This section is empty.

Jump to

Keyboard shortcuts

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