Documentation
¶
Overview ¶
Package advertise provide utilities to find addresses to advertise to cluster peers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultInterfaces = []string{"eth0", "en0"}
DefaultInterfaces is a default list of common interfaces that are used for local network traffic for Unix-like platforms.
Functions ¶
func FirstAddress ¶
FirstAddress returns the "best" IP address from the given interface names. "best" is defined as follow in decreasing order: - IPv4 valid and not link-local unicast - IPv6 valid and not link-local unicast - IPv4 valid and link-local unicast - IPv6 valid and link-local unicast If none of the above are found, an invalid address is returned. Loopback addresses are never selected. If no interfaces are provided, all of the system's network interfaces will retrieved via net.Interfaces and used to find the "best" ip address.
Types ¶
This section is empty.