Documentation ¶
Index ¶
- Constants
- func ConnectionSucceeded()
- func Connectivity() uint8
- func Gateways() []*net.IP
- func GetApproximateInternetLocation() (net.IP, error)
- func GetAssignedAddresses() (ipv4 []net.IP, ipv6 []net.IP, err error)
- func GetAssignedGlobalAddresses() (ipv4 []net.IP, ipv6 []net.IP, err error)
- func NetworkChanged() <-chan struct{}
- type EnvironmentInterface
- type Nameserver
Constants ¶
View Source
const ( UNKNOWN uint8 = iota OFFLINE LIMITED // local network only PORTAL // there seems to be an internet connection, but we are being intercepted ONLINE )
Variables ¶
This section is empty.
Functions ¶
func ConnectionSucceeded ¶
func ConnectionSucceeded()
ConnectionSucceeded should be called when a module was able to successfully connect to the internet (do not call too often)
func Connectivity ¶
func Connectivity() uint8
Connectivity returns the current state of connectivity to the network/Internet
func GetApproximateInternetLocation ¶
GetApproximateInternetLocation returns the IP-address of the nearest ping-answering internet node
func NetworkChanged ¶
func NetworkChanged() <-chan struct{}
Types ¶
type EnvironmentInterface ¶
type EnvironmentInterface struct {
// contains filtered or unexported fields
}
func NewInterface ¶
func NewInterface() *EnvironmentInterface
func (*EnvironmentInterface) NetworkChanged ¶
func (env *EnvironmentInterface) NetworkChanged() bool
type Nameserver ¶
func Nameservers ¶
func Nameservers() []Nameserver
Nameservers returns the currently active nameservers
Click to show internal directories.
Click to hide internal directories.