MCPcopy Index your code
hub / github.com/PuerkitoBio/rehttp

github.com/PuerkitoBio/rehttp @v1.4.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.4.0 ↗ · + Follow
79 symbols 439 edges 15 files 23 documented · 29% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

rehttp Build Status Go Reference

Package rehttp implements an HTTP Transport (an http.RoundTripper) that handles retries. See the godoc for details.

Please note that rehttp requires Go1.6+, because it uses the http.Request.Cancel field to check for cancelled requests. It should work on Go1.5, but only if there is no timeout set on the *http.Client. Go's stdlib will return an error on the first request if that's the case, because it requires a RoundTripper that implements the (now deprecated in Go1.6) CancelRequest method.

On Go1.7+, it uses the context returned by http.Request.Context to check for cancelled requests.

Installation

$ go get github.com/PuerkitoBio/rehttp

License

The BSD 3-Clause license.

Extension points exported contracts — how you extend this code

DelayFn (FuncType)
DelayFn is the signature for functions that return the delay to apply before the next retry.
rehttp.go
RetryFn (FuncType)
RetryFn is the signature for functions that return whether a retry should be done for the request.
rehttp.go

Core symbols most depended-on inside this repo

Close
called by 32
cancelreader.go
ConstDelay
called by 31
rehttp.go
RetryAll
called by 30
rehttp.go
NewTransport
called by 29
rehttp.go
RetryMaxRetries
called by 29
rehttp.go
RetryTemporaryErr
called by 13
rehttp.go
RetryStatuses
called by 10
rehttp.go
RetryStatusInterval
called by 8
rehttp.go

Shape

Function 57
Method 11
Struct 6
FuncType 3
Interface 2

Languages

Go100%

Modules by API surface

rehttp.go22 symbols
rehttp_retryfn_test.go15 symbols
rehttp_server_test.go12 symbols
rehttp_mock_test.go9 symbols
timeouterr_pre113.go3 symbols
rehttp_server_post17_test.go3 symbols
rehttp_delayfn_test.go3 symbols
cancelreader.go3 symbols
perattempttimeout_pre17.go2 symbols
perattempttimeout_post17.go2 symbols
timeouterr_test.go1 symbols
timeouterr_post113.go1 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add rehttp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact