utils

package
v0.0.0-...-c0caad5 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxRetries = 10

MaxRetries is the maximum number of retries before bailing.

Functions

func Retry

func Retry(operation func() error, name string, attempts int, retryWaitSeconds int) (err error)

func RetryInc

func RetryInc(operation func() error, name string, attempts int, retryWaitSeconds int, retryWaitIncSeconds int) (err error)

func TryFunc

func TryFunc(fn Func) error

Do keeps trying the function until the second argument returns false, or no error is returned.

func Validator

func Validator(structInput interface{}) error

Types

type Func

type Func func(attempt int) (retry bool, err error)

Func represents functions that can be retried.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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