retry

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoRetry

func DoRetry(kind, name, tag string, r Retry, fn func() error) error

DoRetry is a help function to retry the function if it returns error

Types

type ErrNoRetry

type ErrNoRetry struct {
	Message string
}

ErrNoRetry is the error need not retry

func (*ErrNoRetry) Error

func (e *ErrNoRetry) Error() string

type Retry

type Retry struct {
	Times    int           `yaml:"times" json:"times,omitempty" jsonschema:"title=Retry Times,description=how many times need to retry,minimum=1"`
	Interval time.Duration `` /* 147-byte string literal not displayed */
}

Retry is the settings of retry

Jump to

Keyboard shortcuts

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