chttp

package
v1.3.4 Latest Latest
Warning

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

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

Documentation

Overview

Package chttp provides a shared HTTP client with request/response debug logging.

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