Documentation
¶
Overview ¶
Package httpclient exposes a single shared *http.Client for all install-path HTTP traffic (recipe fetches, GHCR token exchange, GHCR blob downloads, registry index fetches).
Why share one client? Each *http.Client owns a *http.Transport whose idle-connection pool is the only thing that keeps TCP + TLS connections warm between requests. Constructing a fresh client per call — the previous pattern — gives every request its own empty pool, so a multi-package sync paid for a new TCP handshake and a new TLS negotiation on every recipe fetch and every token exchange.
The shared client deliberately has no per-client Timeout. The install pipeline serves both short metadata fetches (seconds) and long binary downloads (minutes); callers enforce per- request budgets via context.WithTimeout instead.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.