retryx

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoRetryFunc

func DoRetryFunc(ctx context.Context, retryableFunc func() error, retryTimes int, retryIfFn func(error) bool) error

DoRetryFunc 依赖retry-go,失败即进行重试

Types

type RetryOptErr

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

RetryOptErr 重试操作错误

func RetryOptErrWrap

func RetryOptErrWrap(err error) *RetryOptErr

RetryOptErrWrap 返回一个可重试操作的错误,用于重试检测

func (*RetryOptErr) Error

func (e *RetryOptErr) Error() string

Jump to

Keyboard shortcuts

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