Documentation ¶
Overview ¶
Package bootstrap provides types and functions to resolve upstream hostnames and to dial retrieved addresses.
Index ¶
Constants ¶
View Source
const ErrNoResolvers errors.Error = "no resolvers specified"
ErrNoResolvers is returned when zero resolvers specified.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DialHandler ¶
DialHandler is a dial function for creating unencrypted network connections to the upstream server. It establishes the connection to the server specified at initialization and ignores the addr.
func NewDialContext ¶
func NewDialContext(timeout time.Duration, addrs ...string) (h DialHandler)
NewDialContext returns a DialHandler that dials addrs and returns the first successful connection. At least a single addr should be specified.
func ResolveDialContext ¶
func ResolveDialContext( u *url.URL, timeout time.Duration, resolvers []Resolver, preferIPv6 bool, ) (h DialHandler, err error)
ResolveDialContext returns a DialHandler that uses addresses resolved from u using resolvers. u must not be nil.
Click to show internal directories.
Click to hide internal directories.