try

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(fn func() error, opts ...*RetryOption) (err error)

Types

type RetryOption

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

func Option

func Option() *RetryOption

func (*RetryOption) SetInterval

func (opt *RetryOption) SetInterval(interval time.Duration) *RetryOption

func (*RetryOption) SetLimitTimes

func (opt *RetryOption) SetLimitTimes(limitTimes int) *RetryOption

func (*RetryOption) SetOnFail

func (opt *RetryOption) SetOnFail(onFail func(error) bool) *RetryOption

func (*RetryOption) SetTimeout

func (opt *RetryOption) SetTimeout(timeout time.Duration) *RetryOption

Jump to

Keyboard shortcuts

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