awsutil

package
v0.0.0-...-82ab749 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const RequestError = "RequestError"

Variables

This section is empty.

Functions

func ErrorCode

func ErrorCode(err error) string

func ErrorCodeIs

func ErrorCodeIs(err error, code string) bool

func ErrorMessage

func ErrorMessage(err error) string

func ErrorMessageHasPrefix

func ErrorMessageHasPrefix(err error, prefix string) bool

func JitteredExponentialBackoff

func JitteredExponentialBackoff(init, max time.Duration) <-chan time.Duration

JitteredExponentialBackoff sleeps and returns true to make it easy to implement jittered exponential backoff in a for-loop. Here's how you should use it:

for range awsutil.JitteredExponentialBackoff(time.Second, 10*time.Second) { }

func StandardJitteredExponentialBackoff

func StandardJitteredExponentialBackoff() <-chan time.Duration

StandardJitteredExponentialBackoff returns a JitteredExponentialBackoff configured to start at 1 second and backoff to 10 seconds between attempts. Here's how you should use it:

for range awsutil.StandardJitteredExponentialBackoff() { }

Types

This section is empty.

Jump to

Keyboard shortcuts

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