net

package
v0.0.0-...-3f61646 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IP2Int

func IP2Int(ip net.IP) uint32

IP2Int converts IP to integer.

func IsPrivateIpv4

func IsPrivateIpv4(ip string) bool

func LocalIPAddr

func LocalIPAddr() (string, error)

LocalIPAddr extracts the public IP address of current machine

func LocalIPAddrOutside

func LocalIPAddrOutside(privates []string) (string, error)

LocalIPAddrOutside the public IP address of current machine outside the specified private IPs

func LocalIPAddrWithin

func LocalIPAddrWithin(subnets []string) (string, error)

LocalIPAddrWithin picks the IP within the specified subnets.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL