httputil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(timeout time.Duration) *http.Client

NewClient creates a new HTTP client with the given timeout and optimized transport settings. This provides consistent configuration across all HTTP clients in the application.

Transport settings:

  • MaxIdleConns: 100 (total idle connections across all hosts)
  • MaxIdleConnsPerHost: 10 (idle connections per host)
  • IdleConnTimeout: 90s (time to keep idle connections alive)

These settings enable connection reuse and reduce latency for repeated requests to the same hosts (e.g., webhook notifications, RPC calls).

Types

This section is empty.

Jump to

Keyboard shortcuts

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