Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultTimeout is the default dial timeout. DefaultTimeout = 10 * time.Second )
Variables ¶
View Source
var (
DefaultNetDialer = &Dialer{}
)
DefaultNetDialer is the default Dialer used when a nil Dialer is provided.
Functions ¶
This section is empty.
Types ¶
type Dialer ¶
type Dialer struct {
Interface string
Netns string
Mark int
DialFunc func(ctx context.Context, network, addr string) (net.Conn, error)
Log logger.Logger
}
Dialer is a network dialer with support for interface binding, network namespace switching, and socket marking. The zero value is ready to use via DefaultNetDialer.
Click to show internal directories.
Click to hide internal directories.