retry

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Retry

func Retry(f func() error, opts ...Option) error

func RetryWithQueue

func RetryWithQueue(f func() error, producer mq.Producer, topic string, data interface{}, opts ...Option) error

Types

type Option

type Option func(*retryOptions)

func WithAsync

func WithAsync(async bool) Option

func WithBackoff

func WithBackoff(backoff time.Duration) Option

func WithMaxBackoff

func WithMaxBackoff(maxBackoff time.Duration) Option

func WithMaxRetries

func WithMaxRetries(maxRetries int) Option

func WithPutQueueIfFail

func WithPutQueueIfFail(putQueueFunc func() error) Option

Jump to

Keyboard shortcuts

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