Documentation
¶
Overview ¶
Package httpclient builds outbound HTTP clients that own their transport.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoopbackDialer ¶
LoopbackDialer returns a dialer that refuses non-loopback peers unless allow reports true. The check runs on the resolved peer address, so a hostname that resolves elsewhere (or later rebinds) is refused.
func New ¶
New returns a client with its own transport and the given timeout. Create it once per backend and reuse it so connections are pooled.
func NewTransport ¶
NewTransport returns a clone of http.DefaultTransport that no other client shares, so CloseIdleConnections on the default transport (httptest.Server.Close) cannot reach it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.