Skip to content

Retryable HTTP client with configurable options for request delay, random jitter, and exponential backoff.

License

Notifications You must be signed in to change notification settings

cholland1989/go-retryable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-retryable Documentation Build Status

Retryable HTTP client with configurable options for request delay, random jitter, and exponential backoff.

Installation

go get github.com/cholland1989/go-retryable

This library supports version 1.20 and later of Go.

Usage

import "github.com/cholland1989/go-retryable/pkg/retryable"
import "github.com/cholland1989/go-retryable/pkg/unofficial"

Package retryable provides a retryable HTTP client with configurable options for request delay, random jitter, and exponential backoff.

request, err := http.NewRequest(http.MethodGet, "https://www.github.com/", nil)
if err != nil {
    log.Fatal(err)
}
response, err := retryable.DefaultClient.Do(request)
if err != nil {
    log.Fatal(err)
}
defer response.Body.Close()

Package unofficial provides constants for well-known HTTP status codes that are not part of the official specification.

See the documentation for more details.

License

Released under the MIT License.

About

Retryable HTTP client with configurable options for request delay, random jitter, and exponential backoff.

Resources

License

Stars

Watchers

Forks

Packages

No packages published