Documentation
¶
Overview ¶
Package net implements the functions, types, and interfaces for the module.
Index ¶
Constants ¶
View Source
const ( IPv4len = net.IPv4len IPv6len = net.IPv6len )
Variables ¶
This section is empty.
Functions ¶
func HostAddr ¶
func HostAddr(provider NetworkInterfaceProvider, opts ...Option) string
HostAddr now accepts a NetworkInterfaceProvider.
func RealHostAddr ¶ added in v0.3.22
RealHostAddr is a convenience function for external callers to use the real network provider.
Types ¶
type HostConfig ¶ added in v0.0.20
type HostConfig struct {
// contains filtered or unexported fields
}
HostConfig defines the configuration for the host.
func DefaultConfig ¶ added in v0.3.21
func DefaultConfig() HostConfig
type InterfaceWithAddrs ¶ added in v0.3.21
InterfaceWithAddrs abstracts a network interface and its addresses for mocking.
type NetworkInterfaceProvider ¶ added in v0.3.22
type NetworkInterfaceProvider interface {
Interfaces() ([]InterfaceWithAddrs, error)
}
NetworkInterfaceProvider now returns InterfaceWithAddrs.
type Option ¶ added in v0.0.20
type Option = func(*HostConfig)
func WithCIDRFilters ¶ added in v0.0.20
func WithEnvVar ¶ added in v0.0.20
func WithFallback ¶ added in v0.0.20
func WithInterfacePatterns ¶ added in v0.0.20
Click to show internal directories.
Click to hide internal directories.