retryutil

package
v0.0.0-...-f0c808a Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package retryutil provides utility functions for retrying.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetryAPICall

func RetryAPICall(ctx context.Context, maxRetryTime time.Duration, name string, f func() error) error

RetryAPICall retries an API call for maxRetryTime.

func RetryFunc

func RetryFunc(ctx context.Context, maxRetryTime time.Duration, desc string, f func() error) error

RetryFunc retries a function provided as a parameter for maxRetryTime.

func RetrySleep

func RetrySleep(base int, extra int) time.Duration

RetrySleep returns a pseudo-random sleep duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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