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 DiffMap(base, newTags map[string]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 GenerateCustomTag(dataMap map[string]interface{}, keyRegex *regexp.Regexp, valueMaxLength int, ...) []string
- func GenerateIPMask(ip string) int
- func GenerateWANVInterfaceMac(mac string) string
- func GetAZLcuuidFromUUIDGenerate(orgID int, uuidGenerate string) string
- func GetBasicNetworkLcuuid(vpcLcuuid string) string
- func GetBasicVPCAndNetworks(orgID int, regions []model.Region, ...) ([]model.VPC, []model.Network)
- func GetBasicVPCLcuuid(uuidGenerate, regionLcuuid string) string
- func GetHostAndVmHostNameByDomain(domain string, db *gorm.DB) (map[string]string, map[string]string, error)
- func GetHostIPByName(name string) (string, error)
- func GetHostNics(orgID int, hosts []model.Host, domainName, uuidGenerate, portNameRegex string, ...) ([]model.Subnet, []model.VInterface, []model.IP, map[string][]model.Subnet, ...)
- func GetNodeHostNameByDomain(lcuuid string, isSubDomain bool, db *gorm.DB) (map[string]string, error)
- func GetUnverifyHTTPClient(timeout time.Duration) *http.Client
- func GetVPCLcuuidFromUUIDGenerate(orgID int, uuidGenerate string) string
- func GetVTapSubDomainMappingByDomain(domain string, db *gorm.DB) (map[int]string, error)
- 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 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
- func UniqRegions(regionStrings string) map[string]bool
- type Debugger
Constants ¶
View Source
const ( CLOUD_SYNC_TIMER_DEFAULT = 60 CLOUD_SYNC_TIMER_MIN = 1 CLOUD_SYNC_TIMER_MAX = 86400 )
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 )
View Source
const ( K8S_VPC_NAME = "kubernetes_vpc" K8S_VERSION_PREFIX = "Kubernetes" )
View Source
const (
SVC_RULE_RESOURCE_NAME = "virtual-kubelet.io/provider-resource-name"
)
Variables ¶
This section is empty.
Functions ¶
func CheckJsonAttributes ¶
func CheckMapAttributes ¶
func ContainsIP ¶
func EliminateEmptyAZs ¶
func EliminateEmptyRegions ¶
func GenerateCIDR ¶
func GenerateCustomTag ¶
func GenerateIPMask ¶
func GetBasicNetworkLcuuid ¶
func GetBasicVPCAndNetworks ¶
func GetBasicVPCLcuuid ¶
针对各私有云平台,每个区域生成一个基础VPC和子网 宿主机及管理节点的接口和IP属于基础VPC和子网
func GetHostIPByName ¶
根据主机名获取主机IP 不同方式优先级:DNS > file > Hash
func GetHostNics ¶
func GetHostNics(orgID int, hosts []model.Host, domainName, uuidGenerate, portNameRegex string, excludeIPs []string) ( []model.Subnet, []model.VInterface, []model.IP, map[string][]model.Subnet, error, )
根据采集器上报的接口信息,生成宿主机的接口和IP信息
func GetNodeHostNameByDomain ¶
func IsIPInCIDR ¶
func ReadJSONFile ¶
func ReadLineJSONFile ¶
func RequestGet ¶
func RequestPost ¶
func StringInterfaceMapKeys ¶
func StringStringMapKeys ¶
func StringStringMapValues ¶
func TidyIPString ¶
func UniqRegions ¶ added in v1.6.65
Types ¶
type Debugger ¶
type Debugger struct {
// contains filtered or unexported fields
}
func NewDebugger ¶
Click to show internal directories.
Click to hide internal directories.