Documentation
¶
Overview ¶
Process wide preference for IPv4 that every outbound dial of the program follows
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyIPv4Preference ¶
func ApplyIPv4Preference(force bool)
Makes the default HTTP transport and every clone made after it resolve unspecified families as IPv4 first
func DialContext ¶
func DialContext(dial func(ctx context.Context, network, addr string) (net.Conn, error)) func(ctx context.Context, network, addr string) (net.Conn, error)
Dial function that follows the process preference at each dial, so a preference set after a client was built still applies
func Follow ¶
Makes a transport follow the process preference at each dial, whatever dial function it already carries
func IPv4Preferred ¶
func IPv4Preferred() bool
Reports whether the process prefers IPv4 for connections that name no address family
Types ¶
type DialFunc ¶
Dial function shape of net.Dialer and http.Transport
func PreferIPv4 ¶
Wraps dial so tcp and udp dials use the host's A records, falling back to full resolution when it has none