chttp

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient(name string) *http.Client

Types

type RetryTransport added in v0.9.0

type RetryTransport struct {
	// contains filtered or unexported fields
}

RetryTransport wraps an http.RoundTripper with retry logic for transient failures. It retries on connection errors, 429 (rate limited), and 5xx (server error) responses.

func NewRetryTransport added in v0.9.0

func NewRetryTransport(name string, t http.RoundTripper, maxRetry int) *RetryTransport

func (*RetryTransport) RoundTrip added in v0.9.0

func (t *RetryTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Transport

type Transport struct {
	// contains filtered or unexported fields
}

func NewTransport

func NewTransport(name string, t http.RoundTripper) *Transport

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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