runtimehelper

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recover

func Recover(msg string, cfg ...*RecoverConfig)

Types

type RecoverConfig added in v1.1.0

type RecoverConfig struct {
	Log      alog.Logger
	Callback func(error)
}

RecoverConfig is the option for Recover.

func NewRecoverConfig added in v1.1.7

func NewRecoverConfig(options ...RecoverOption) *RecoverConfig

NewRecoverConfig returns a new RecoverOption.

type RecoverOption added in v1.1.0

type RecoverOption func(*RecoverConfig)

func WithCallback added in v1.1.0

func WithCallback(callback func(error)) RecoverOption

WithCallback sets the callback.

func WithLog added in v1.1.0

func WithLog(log alog.Logger) RecoverOption

WithLog sets the log.

Jump to

Keyboard shortcuts

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