retryx

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package retryx helps to retry operations

Index

Constants

This section is empty.

Variables

View Source
var (
	// Attempts is the number of attempts
	Attempts uint = 4

	// Delay is the base interval for exponential backoff
	Delay = 500 * time.Millisecond
)

Functions

func Do

func Do(ctx context.Context, fn func() error) error

Do retries fn for Attempts times using exponentiat backoff with a base interval equal to Delay.

Types

This section is empty.

Jump to

Keyboard shortcuts

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