retry

package
v0.43.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package retry provides a retry pattern implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action func() (interface{}, error)

Action function to execute in retry.

type Retry

type Retry struct {
	// contains filtered or unexported fields
}

Retry pattern with retries and optional delay.

func New

func New(retries int, delay time.Duration) (*Retry, error)

New constructor.

func (Retry) Execute

func (r Retry) Execute(act Action) (interface{}, error)

Execute a specific action.

Jump to

Keyboard shortcuts

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