http

package
v0.1.37 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClientWithDebugMetrics

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

HTTPClientWithDebugMetrics provides HTTP client functionality with embedded tracking of debug metrics. It includes things like: - Built-in request debugging - Metrics collection - Detailed logging - Timeout debugging - Connection issue visibility

TODO_TECHDEBT(@red-0ne): Consider moving this HTTP client implementation to ShannonSDK for sharing between RelayMiner and PATH once optimizations stabilize and requirements align. For now, keeping separate implementations to allow independent optimization. See: https://github.com/pokt-network/poktroll/pull/1764#pullrequestreview-3232115767

func NewDefaultHTTPClientWithDebugMetrics

func NewDefaultHTTPClientWithDebugMetrics() *HTTPClientWithDebugMetrics

NewDefaultHTTPClientWithDebugMetrics creates a new HTTP client with: - Transport settings configured for high-concurrency usage - Built in request debugging capabilities and metrics tracking TODO_TECHDEBT(@adshmh): Make HTTP client settings configurable

func (*HTTPClientWithDebugMetrics) Do

TODO_TECHDEBT(@adshmh): Switch to buffered reading of the HTTP response.

Do executes an HTTP request using the provided context and logger. It acquires a concurrency slot before proceeding and sets up a debugging context to track detailed metrics of the request lifecycle. In case of an error, it logs the metrics for debugging purposes.

Returns: - *http.Response: the HTTP response received from the server. - error: an error if the request fails, or nil if successful.

Jump to

Keyboard shortcuts

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