Documentation ¶
Index ¶
- Constants
- func AggregateCIDR(ips []netaddr.IPPrefix, maxMask int) (cirdsString []string)
- func BKDRHash(str string) uint32
- func CheckJsonAttributes(json *simplejson.Json, requiredAttrs []string) bool
- func CheckMapAttributes(data map[string]interface{}, requiredAttrs []string) bool
- func ContainsIP(cidrs []string, ip string) bool
- func EliminateEmptyAZs(azs []model.AZ, azLcuuidToResourceNum map[string]int) []model.AZ
- func EliminateEmptyRegions(regions []model.Region, regionLcuuidToResourceNum map[string]int) []model.Region
- func GenerateCIDR(ips []netaddr.IPPrefix, maxMask int) (cirds []netaddr.IPPrefix)
- func GenerateIPMask(ip string) int
- func GenerateWANVInterfaceMac(mac string) string
- func GetAZLcuuidFromUUIDGenerate(uuidGenerate string) string
- func GetBasicNetworkLcuuid(vpcLcuuid string) string
- func GetBasicVPCAndNetworks(regions []model.Region, regionLcuuid, domainName, uuidGenerate string) ([]model.VPC, []model.Network)
- func GetBasicVPCLcuuid(uuidGenerate, regionLcuuid string) string
- func GetHostIPByName(name string) (string, error)
- func GetHostNics(hosts []model.Host, domainName, uuidGenerate, portNameRegex string, ...) ([]model.Subnet, []model.VInterface, []model.IP, map[string][]model.Subnet, ...)
- func GetUnverifyHTTPClient(timeout time.Duration) *http.Client
- func IPAndMaskToCIDR(ip string, mask int) (string, error)
- func InetNToA(ip uint32) string
- func IsIPInCIDR(ip, cidr string) bool
- func ReadJSONFile(path string) (*simplejson.Json, error)
- func ReadLineJSONFile(path string) (js []*simplejson.Json, err error)
- func RequestGet(url, token string, timeout time.Duration) (jsonResp *simplejson.Json, err error)
- func RequestPost(url string, timeout time.Duration, body map[string]interface{}) (jsonResp *simplejson.Json, err error)
- func StringInterfaceMapKVs(m map[string]interface{}, sep string) (items []string)
- func StringInterfaceMapKeys(m map[string]interface{}) (keys []string)
- func StringSliceStringMapKeys(m map[string][]string) (keys []string)
- func StringStringMapKeys(m map[string]string) (keys []string)
- func StringStringMapValues(m map[string]string) (values []string)
- func TidyIPString(ipsString []string) (v4Prefix, v6Prefix []netaddr.IPPrefix, err error)
- func UnionMapStringInt(m, n map[string]int) map[string]int
- func UnionMapStringSet(m, n map[string]mapset.Set) map[string]mapset.Set
- func UnionMapStringString(m, n map[string]string) map[string]string
- type Debugger
Constants ¶
View Source
const ( SECURITY_GROUP_RULE_ACCEPT = 1 SECURITY_GROUP_RULE_DROP = 2 SECURITY_GROUP_RULE_INGRESS = 1 SECURITY_GROUP_RULE_EGRESS = 2 SECURITY_GROUP_IPV4 = 1 SECURITY_GROUP_IPV6 = 2 )
View Source
const ( PORT_RANGE_ALL = "0-65535" PROTOCOL_ALL = "ALL" )
View Source
const ( SUBNET_DEFAULT_CIDR_IPV4 = "0.0.0.0/0" SUBNET_DEFAULT_CIDR_IPV6 = "::/0" )
View Source
const ( NAT_RULE_TYPE_DNAT = "DNAT" NAT_RULE_TYPE_SNAT = "SNAT" )
View Source
const ( LB_MODEL_INTERNAL = 1 + iota LB_MODEL_EXTERNAL )
Variables ¶
This section is empty.
Functions ¶
func CheckJsonAttributes ¶
func CheckMapAttributes ¶
func ContainsIP ¶
func EliminateEmptyAZs ¶
func EliminateEmptyRegions ¶
func GenerateCIDR ¶
func GenerateIPMask ¶
func GetBasicNetworkLcuuid ¶
func GetBasicVPCAndNetworks ¶
func GetBasicVPCLcuuid ¶
针对各私有云平台,每个区域生成一个基础VPC和子网 宿主机及管理节点的接口和IP属于基础VPC和子网
func GetHostIPByName ¶
根据主机名获取主机IP 不同方式优先级:DNS > file > Hash
func GetHostNics ¶
func GetHostNics(hosts []model.Host, domainName, uuidGenerate, portNameRegex string, excludeIPs []string) ( []model.Subnet, []model.VInterface, []model.IP, map[string][]model.Subnet, error, )
根据采集器上报的接口信息,生成宿主机的接口和IP信息
func IsIPInCIDR ¶
func ReadJSONFile ¶
func ReadLineJSONFile ¶
func RequestGet ¶
func RequestPost ¶
func StringInterfaceMapKVs ¶
func StringInterfaceMapKeys ¶
func StringStringMapKeys ¶
func StringStringMapValues ¶
func TidyIPString ¶
Types ¶
type Debugger ¶
type Debugger struct {
// contains filtered or unexported fields
}
func NewDebugger ¶
Click to show internal directories.
Click to hide internal directories.