Documentation ¶
Index ¶
- Constants
- Variables
- func CheckIsDefaultRoute(host net.IP) error
- func CompareIP(v1, v2 string) int
- func GetHostNetInterface(host net.IP) (string, error)
- func GetIndexIP(subnet *net.IPNet, index int) (string, error)
- func GetLocalDefaultIP() (string, error)
- func GetLocalHostAddresses() ([]net.Addr, error)
- func GetLocalIP(master0IPPort string) (net.IP, error)
- func IPStrsToIPs(ipStrs []string) []net.IP
- func IPToInt(v string) *big.Int
- func IPsToIPStrs(ips []net.IP) []string
- func IsInIPList(key net.IP, slice []net.IP) bool
- func IsIpv4(ip string) bool
- func IsLocalIP(ip net.IP, addrs []net.Addr) bool
- func NextIP(ip string) net.IP
- func RemoveIPs(clusterIPList []net.IP, toBeDeletedIPList []net.IP) (res []net.IP)
- func SortIPList(iplist []string)
- func TransferToIPList(ipStr string) (string, error)
- type Route
Constants ¶
View Source
const ( RouteArg = "%s via %s dev %s metric 50" BackupAndDelStaticRouteFile = `` /* 207-byte string literal not displayed */ AddStaticRouteFile = `cat /etc/sysconfig/network-scripts/route-%s|grep "%s" || echo "%s" >> /etc/sysconfig/network-scripts/route-%s` )
View Source
const ( RouteOK = "ok" RouteFailed = "failed" )
Variables ¶
View Source
var ErrNotIPV4 = errors.New("IP addresses are not IPV4 rules")
Functions ¶
func CheckIsDefaultRoute ¶
func GetLocalDefaultIP ¶
func GetLocalHostAddresses ¶
func IPStrsToIPs ¶
func IPsToIPStrs ¶
func SortIPList ¶
func SortIPList(iplist []string)
func TransferToIPList ¶ added in v0.9.0
TransferToIPList transfer network segment string to ip list string
Types ¶
Click to show internal directories.
Click to hide internal directories.