Documentation
¶
Index ¶
Constants ¶
View Source
const NetcheckInterface = "netcheck"
NetcheckInterface is the Interface recorded on addresses netcheck observed rather than read off a local link. It names no real interface.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Interface string `json:"interface"`
IP string `json:"ip"`
Network string `json:"network"`
IsIPv6 bool `json:"is_ipv6"`
// LinkType is the kernel's name for the kind of link the address sits
// on ("device", "tuntap", "wireguard", "bridge", …), empty where the
// platform can't say. Tun and tap devices both report "tuntap".
LinkType string `json:"link_type,omitempty"`
// PointToPoint is set for links with no broadcast domain, which is how
// tunnels (tun devices, WireGuard) present themselves.
PointToPoint bool `json:"point_to_point,omitempty"`
}
Address represents an IP address associated with a network interface
type Discovery ¶
type Discovery struct {
Addresses []Address `json:"addresses"`
}
Discovery holds information about discovered IP addresses
type Options ¶ added in v0.7.0
type Options struct {
// NetcheckURL, when set, enables public IP discovery via a zero-port
// netcheck request to the given URL. On cloud providers the external IP
// isn't on any local interface, so this is the only way to find it.
NetcheckURL string
}
Options configures IP discovery behavior.
Click to show internal directories.
Click to hide internal directories.