wrapper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotRetryable = errors.New("not retryable")

Functions

func WithError added in v0.2.0

func WithError(job func(context.Context) error, result func(error)) func(context.Context)

WithError is a job wrapper that allows to use jobs that return errors.

func WithRetry

func WithRetry(job func(context.Context) error, retries uint) func(context.Context)

WithRetry is a job wrapper that allows to retry a job if it returns an error.

If you consider than the error is not retryable you can either return nil or the custom "ErrNotRetryable".

Types

This section is empty.

Jump to

Keyboard shortcuts

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