Documentation ¶
Index ¶
Constants ¶
View Source
const ( MethodFirst = "first-found" MethodInterface = "interface=" MethodCidr = "cidr=" MethodCanReach = "can-reach=" )
View Source
const ( IPv4 = 4 IPv6 = 6 )
Variables ¶
View Source
var DefaultInterfacesToExclude = []string{
"docker.*", "cbr.*", "dummy.*",
"virbr.*", "lxcbr.*", "veth.*", "lo",
"vxlan.calico", "cali.*", "tunl.*", "flannel.*", "kube-ipvs.*", "cni.*",
}
DefaultInterfacesToExclude Default interfaces to exclude for any logic following the first-found autodetect IP method
Functions ¶
func AutoDetectCIDR ¶
AutoDetectCIDR auto-detects the IP and Network using the requested detection method.
func CheckCalicoMethod ¶ added in v1.3.2
func CheckMethod ¶
Types ¶
type Interface ¶
Interface contains details about an interface on the host.
func FilteredEnumeration ¶
func FilteredEnumeration(incl, excl []string, cidrs []net.IPNet, version int) (*Interface, *net.IPNet, error)
FilteredEnumeration performs basic IP and IPNetwork discovery by enumerating all interfaces and filtering in/out based on the supplied filter regex.
The incl and excl slice of regex strings may be nil.
Click to show internal directories.
Click to hide internal directories.