Documentation
¶
Index ¶
- Variables
- func GetLoopbackNetworkInterfaces() []string
- func GetNetworkInterfaceIndexesByName(names []string) []int
- func GetNonLoopbackNetworkInterfaces() []string
- func GetOwnIPs() []net.IP
- func GetOwnNetworkInterfaces() []string
- func IpToNet(ip net.IP) *net.IPNet
- func IpsToNets(ips []net.IP) []net.IPNet
- func ParseCIDR(s string) (*net.IPNet, error)
- func ParseCIDRs(raw []string) ([]net.IPNet, []string)
- type NetWithPortRange
- func (nwp NetWithPortRange) Compare(b NetWithPortRange) int
- func (nwp NetWithPortRange) Contains(other NetWithPortRange) bool
- func (nwp NetWithPortRange) Merge(b NetWithPortRange) NetWithPortRange
- func (nwp NetWithPortRange) Overlap(other NetWithPortRange) bool
- func (nwp NetWithPortRange) String() string
- type PortRange
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NetAnyIpv4 = net.IPNet{IP: net.IPv4zero, Mask: net.CIDRMask(0, 32)} NetAnyIpv6 = net.IPNet{IP: net.IPv6zero, Mask: net.CIDRMask(0, 128)} NetAny = []net.IPNet{NetAnyIpv4, NetAnyIpv6} )
View Source
var (
PortRangeAny = PortRange{From: 1, To: 65534}
)
Functions ¶
func GetLoopbackNetworkInterfaces ¶ added in v1.3.0
func GetLoopbackNetworkInterfaces() []string
func GetNetworkInterfaceIndexesByName ¶ added in v1.3.0
func GetNonLoopbackNetworkInterfaces ¶ added in v1.3.0
func GetNonLoopbackNetworkInterfaces() []string
func GetOwnNetworkInterfaces ¶
func GetOwnNetworkInterfaces() []string
Types ¶
type NetWithPortRange ¶
func ComputeExcludesForOwnIpAndPorts ¶ added in v1.2.8
func ComputeExcludesForOwnIpAndPorts(port, healthPort uint16) []NetWithPortRange
func NewNetWithPortRanges ¶
func NewNetWithPortRanges(nets []net.IPNet, portRanges ...PortRange) []NetWithPortRange
func (NetWithPortRange) Compare ¶ added in v1.2.9
func (nwp NetWithPortRange) Compare(b NetWithPortRange) int
func (NetWithPortRange) Contains ¶ added in v1.2.8
func (nwp NetWithPortRange) Contains(other NetWithPortRange) bool
func (NetWithPortRange) Merge ¶ added in v1.3.0
func (nwp NetWithPortRange) Merge(b NetWithPortRange) NetWithPortRange
func (NetWithPortRange) Overlap ¶ added in v1.2.8
func (nwp NetWithPortRange) Overlap(other NetWithPortRange) bool
func (NetWithPortRange) String ¶
func (nwp NetWithPortRange) String() string
Click to show internal directories.
Click to hide internal directories.