httpx

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package httpx provides shared, tuned HTTP clients for ketch.

The default transport is configured for crawling a single host at non-trivial concurrency: MaxIdleConnsPerHost is high enough to avoid per-request TLS handshakes, and every client carries a request-level Timeout so a hung peer cannot stall a worker forever.

Index

Constants

View Source
const DefaultMaxIdleConnsPerHost = 16

DefaultMaxIdleConnsPerHost keeps enough keep-alive connections around to serve a typical crawl concurrency without re-handshaking.

View Source
const DefaultTimeout = 30 * time.Second

DefaultTimeout is the per-request timeout for ketch HTTP clients.

Variables

This section is empty.

Functions

func Default

func Default() *http.Client

Default returns a process-wide shared client with ketch defaults.

func New

func New(timeout time.Duration, maxIdleConnsPerHost int) *http.Client

New returns an *http.Client with a tuned transport. Safe for concurrent use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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