retry

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package retry provide the retry function.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Retry

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

func Times

func Times(times int) *Retry

Times creates a Retry with times.

func (*Retry) Do

func (r *Retry) Do(fn func() error) error

Do execute the given func with retry.

func (*Retry) Times

func (r *Retry) Times(times int) *Retry

Times sets the retry times.

func (*Retry) WithContext

func (r *Retry) WithContext(ctx context.Context) *Retry

WithContext sets the retry context.

func (*Retry) WithInterval

func (r *Retry) WithInterval(interval time.Duration) *Retry

WithInterval sets the retry interval.

Jump to

Keyboard shortcuts

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