utils

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPermanent = errors.New("permanent error. cannot be retried")

Functions

func CreatePermanentError

func CreatePermanentError(err error) error

CreatePermanentError will return a permanent error with the string contents of the passed in error

func EmitPermanentError

func EmitPermanentError(err error, handler EmitHandler) error

EmitPermanentError will execute the handler if the error is Permanent and return nil. Otherwise it will return the passed in error.

Types

type EmitHandler

type EmitHandler func(err error)

Jump to

Keyboard shortcuts

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