Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultDialTimeout = 30 * time.Second
Variables ¶
View Source
var DefaultClient *http.Client
View Source
var DefaultDNSServers = []string{
"ns1.agentuity.com:53",
"ns2.agentuity.com:53",
"ns3.agentuity.com:53",
}
Functions ¶
This section is empty.
Types ¶
type DialOption ¶
type DialOption func(*dialerOptions)
func WithDNS ¶
func WithDNS(dnsServers ...string) DialOption
WithDNS sets the DNS servers to use for the dialer instead of the default ones.
type Dialer ¶
type Dialer struct {
Timeout time.Duration
Deadline time.Time
LocalAddr net.Addr
DualStack bool
FallbackDelay time.Duration
KeepAlive time.Duration
Control func(network, address string, c syscall.RawConn) error
// contains filtered or unexported fields
}
var DefaultDialer *Dialer
func New ¶
func New(opts ...DialOption) (*Dialer, error)
Click to show internal directories.
Click to hide internal directories.