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
Click to show internal directories.
Click to hide internal directories.