Documentation ¶
Index ¶
- Variables
- type AZ
- type CEN
- type CacheHandler
- type Callbacks
- type DHCPPort
- type DataGenerator
- type FloatingIP
- type Host
- type IP
- type LANIP
- type LB
- type LBListener
- type LBTargetServer
- type LBVMConnection
- type NATGateway
- type NATRule
- type NATVMConnection
- type Network
- type PeerConnection
- type Pod
- type PodCluster
- type PodGroup
- type PodGroupPort
- type PodIngress
- type PodIngressRule
- type PodIngressRuleBackend
- type PodNamespace
- type PodNode
- type PodReplicaSet
- type PodService
- type PodServicePort
- type Process
- type RDSInstance
- type RedisInstance
- type Region
- type ResourceUpdater
- type RoutingTable
- type SecurityGroup
- type SecurityGroupRule
- type SubDomain
- type Subnet
- type UpdaterBase
- type VInterface
- type VM
- type VMPodNodeConnection
- type VMSecurityGroup
- type VPC
- type VRouter
- type WANIP
Constants ¶
This section is empty.
Variables ¶
View Source
var ResourceTypeToUpdatableFields = map[string][]string{
"region": {"name", "label"},
"az": {"name", "label", "region"},
"sub_domain": {},
"host": {"name", "region", "az", "ip", "htype", "vcpu_num", "mem_total", "extra_info"},
"vm": {"name", "state", "launch_server", "epc_id", "az", "region", "htype", "label"},
"vpc": {"name", "cidr", "label", "tunnel_id", "region"},
"network": {"name", "label", "segmentation_id", "region", "az", "epc_id", "net_type", "tunnel_id"},
"subnet": {"name", "label"},
"vrouter": {"name", "label", "epc_id", "region"},
"routing_table": {"destination", "nexthop_type", "nexthop"},
"dhcp_port": {"name", "region", "az"},
"vinterface": {"name", "subnetid", "tap_mac", "region"},
"wan_ip": {"region"},
"floating_ip": {"region"},
"security_group": {"name", "label", "region"},
"security_group_rule": {"priority", "ethertype", "remote_port_range", "remote", "local"},
"vm_security_group": {"priority"},
"nat_gateway": {"name", "floating_ips", "region"},
"lb": {"name", "model", "vip", "region"},
"lb_listener": {"name", "port", "protocol", "ips", "snat_ips"},
"lb_target_server": {"port", "protocol", "ip"},
"peer_connection": {"name", "remote_region_id", "local_region_id"},
"cen": {"name", "epc_ids"},
"rds_instance": {"name", "state", "series", "model", "region"},
"redis_instance": {"name", "state", "public_host", "region"},
"pod_cluser": {"name", "region", "az", "cluster_name"},
"pod_node": {"state", "az", "region", "vcpu_num", "mem_total"},
"pod_namespace": {"region", "az"},
"pod_ingress": {"name", "region", "az"},
"pod_service": {"name", "selector", "pod_ingress_id", "service_cluster_ip", "region", "az"},
"pod_service_port": {"name"},
"pod_group": {"name", "pod_num", "label", "region", "az", "type"},
"pod_group_port": {"name"},
"pod_replica_set": {"name", "pod_num", "region", "az"},
"pod": {"name", "state", "region", "az", "epc_id", "pod_rs_id", "pod_node_id", "created_at"},
}
Functions ¶
This section is empty.
Types ¶
type AZ ¶
type AZ struct { UpdaterBase[cloudmodel.AZ, mysql.AZ, *cache.AZ] }
type CEN ¶
type CEN struct { UpdaterBase[cloudmodel.CEN, mysql.CEN, *cache.CEN] }
type CacheHandler ¶
type CacheHandler[CT constraint.CloudModel, MT constraint.MySQLModel, BT constraint.DiffBase[MT]] interface { // contains filtered or unexported methods }
type Callbacks ¶
type Callbacks[CT constraint.CloudModel, MT constraint.MySQLModel, BT constraint.DiffBase[MT]] struct { // contains filtered or unexported fields }
type DHCPPort ¶
type DHCPPort struct { UpdaterBase[cloudmodel.DHCPPort, mysql.DHCPPort, *cache.DHCPPort] }
func NewDHCPPort ¶
func NewDHCPPort(wholeCache *cache.Cache, cloudData []cloudmodel.DHCPPort) *DHCPPort
type DataGenerator ¶
type DataGenerator[CT constraint.CloudModel, MT constraint.MySQLModel, BT constraint.DiffBase[MT]] interface { // contains filtered or unexported methods }
type FloatingIP ¶
type FloatingIP struct { UpdaterBase[cloudmodel.FloatingIP, mysql.FloatingIP, *cache.FloatingIP] }
func NewFloatingIP ¶
func NewFloatingIP(wholeCache *cache.Cache, cloudData []cloudmodel.FloatingIP) *FloatingIP
type Host ¶
type Host struct { UpdaterBase[cloudmodel.Host, mysql.Host, *cache.Host] }
type IP ¶
type IP struct {
// contains filtered or unexported fields
}
func NewIP ¶
func NewIP(cache *cache.Cache, cloudData []cloudmodel.IP, domainToolDataSet *cache.ToolDataSet) *IP
func (*IP) HandleAddAndUpdate ¶
func (i *IP) HandleAddAndUpdate()
func (*IP) HandleDelete ¶
func (i *IP) HandleDelete()
type LANIP ¶
type LANIP struct { UpdaterBase[cloudmodel.IP, mysql.LANIP, *cache.LANIP] }
func (*LANIP) SetCloudData ¶
func (i *LANIP) SetCloudData(cloudData []cloudmodel.IP)
type LB ¶
type LB struct { UpdaterBase[cloudmodel.LB, mysql.LB, *cache.LB] }
type LBListener ¶
type LBListener struct { UpdaterBase[cloudmodel.LBListener, mysql.LBListener, *cache.LBListener] }
func NewLBListener ¶
func NewLBListener(wholeCache *cache.Cache, cloudData []cloudmodel.LBListener) *LBListener
type LBTargetServer ¶
type LBTargetServer struct { UpdaterBase[cloudmodel.LBTargetServer, mysql.LBTargetServer, *cache.LBTargetServer] }
func NewLBTargetServer ¶
func NewLBTargetServer(wholeCache *cache.Cache, cloudData []cloudmodel.LBTargetServer) *LBTargetServer
type LBVMConnection ¶
type LBVMConnection struct { UpdaterBase[cloudmodel.LBVMConnection, mysql.LBVMConnection, *cache.LBVMConnection] }
func NewLBVMConnection ¶
func NewLBVMConnection(wholeCache *cache.Cache, cloudData []cloudmodel.LBVMConnection) *LBVMConnection
type NATGateway ¶
type NATGateway struct { UpdaterBase[cloudmodel.NATGateway, mysql.NATGateway, *cache.NATGateway] }
func NewNATGateway ¶
func NewNATGateway(wholeCache *cache.Cache, cloudData []cloudmodel.NATGateway) *NATGateway
type NATRule ¶
type NATRule struct { UpdaterBase[cloudmodel.NATRule, mysql.NATRule, *cache.NATRule] }
func NewNATRule ¶
func NewNATRule(wholeCache *cache.Cache, cloudData []cloudmodel.NATRule) *NATRule
type NATVMConnection ¶
type NATVMConnection struct { UpdaterBase[cloudmodel.NATVMConnection, mysql.NATVMConnection, *cache.NATVMConnection] }
func NewNATVMConnection ¶
func NewNATVMConnection(wholeCache *cache.Cache, cloudData []cloudmodel.NATVMConnection) *NATVMConnection
type Network ¶
type Network struct { UpdaterBase[cloudmodel.Network, mysql.Network, *cache.Network] }
func NewNetwork ¶
func NewNetwork(wholeCache *cache.Cache, cloudData []cloudmodel.Network) *Network
type PeerConnection ¶
type PeerConnection struct { UpdaterBase[cloudmodel.PeerConnection, mysql.PeerConnection, *cache.PeerConnection] }
func NewPeerConnection ¶
func NewPeerConnection(wholeCache *cache.Cache, cloudData []cloudmodel.PeerConnection) *PeerConnection
type Pod ¶
type Pod struct { UpdaterBase[cloudmodel.Pod, mysql.Pod, *cache.Pod] }
type PodCluster ¶
type PodCluster struct { UpdaterBase[cloudmodel.PodCluster, mysql.PodCluster, *cache.PodCluster] }
func NewPodCluster ¶
func NewPodCluster(wholeCache *cache.Cache, cloudData []cloudmodel.PodCluster) *PodCluster
type PodGroup ¶
type PodGroup struct { UpdaterBase[cloudmodel.PodGroup, mysql.PodGroup, *cache.PodGroup] }
func NewPodGroup ¶
func NewPodGroup(wholeCache *cache.Cache, cloudData []cloudmodel.PodGroup) *PodGroup
type PodGroupPort ¶
type PodGroupPort struct { UpdaterBase[cloudmodel.PodGroupPort, mysql.PodGroupPort, *cache.PodGroupPort] }
func NewPodGroupPort ¶
func NewPodGroupPort(wholeCache *cache.Cache, cloudData []cloudmodel.PodGroupPort) *PodGroupPort
type PodIngress ¶
type PodIngress struct { UpdaterBase[cloudmodel.PodIngress, mysql.PodIngress, *cache.PodIngress] }
func NewPodIngress ¶
func NewPodIngress(wholeCache *cache.Cache, cloudData []cloudmodel.PodIngress) *PodIngress
type PodIngressRule ¶
type PodIngressRule struct { UpdaterBase[cloudmodel.PodIngressRule, mysql.PodIngressRule, *cache.PodIngressRule] }
func NewPodIngressRule ¶
func NewPodIngressRule(wholeCache *cache.Cache, cloudData []cloudmodel.PodIngressRule) *PodIngressRule
type PodIngressRuleBackend ¶
type PodIngressRuleBackend struct { UpdaterBase[cloudmodel.PodIngressRuleBackend, mysql.PodIngressRuleBackend, *cache.PodIngressRuleBackend] }
func NewPodIngressRuleBackend ¶
func NewPodIngressRuleBackend(wholeCache *cache.Cache, cloudData []cloudmodel.PodIngressRuleBackend) *PodIngressRuleBackend
type PodNamespace ¶
type PodNamespace struct { UpdaterBase[cloudmodel.PodNamespace, mysql.PodNamespace, *cache.PodNamespace] }
func NewPodNamespace ¶
func NewPodNamespace(wholeCache *cache.Cache, cloudData []cloudmodel.PodNamespace) *PodNamespace
type PodNode ¶
type PodNode struct { UpdaterBase[cloudmodel.PodNode, mysql.PodNode, *cache.PodNode] }
func NewPodNode ¶
func NewPodNode(wholeCache *cache.Cache, cloudData []cloudmodel.PodNode) *PodNode
type PodReplicaSet ¶
type PodReplicaSet struct { UpdaterBase[cloudmodel.PodReplicaSet, mysql.PodReplicaSet, *cache.PodReplicaSet] }
func NewPodReplicaSet ¶
func NewPodReplicaSet(wholeCache *cache.Cache, cloudData []cloudmodel.PodReplicaSet) *PodReplicaSet
type PodService ¶
type PodService struct { UpdaterBase[cloudmodel.PodService, mysql.PodService, *cache.PodService] }
func NewPodService ¶
func NewPodService(wholeCache *cache.Cache, cloudData []cloudmodel.PodService) *PodService
type PodServicePort ¶
type PodServicePort struct { UpdaterBase[cloudmodel.PodServicePort, mysql.PodServicePort, *cache.PodServicePort] }
func NewPodServicePort ¶
func NewPodServicePort(wholeCache *cache.Cache, cloudData []cloudmodel.PodServicePort) *PodServicePort
type Process ¶
type Process struct { UpdaterBase[cloudmodel.Process, mysql.Process, *cache.Process] }
func NewProcess ¶
func NewProcess(wholeCache *cache.Cache, cloudData []cloudmodel.Process) *Process
type RDSInstance ¶
type RDSInstance struct { UpdaterBase[cloudmodel.RDSInstance, mysql.RDSInstance, *cache.RDSInstance] }
func NewRDSInstance ¶
func NewRDSInstance(wholeCache *cache.Cache, cloudData []cloudmodel.RDSInstance) *RDSInstance
type RedisInstance ¶
type RedisInstance struct { UpdaterBase[cloudmodel.RedisInstance, mysql.RedisInstance, *cache.RedisInstance] }
func NewRedisInstance ¶
func NewRedisInstance(wholeCache *cache.Cache, cloudData []cloudmodel.RedisInstance) *RedisInstance
type Region ¶
type Region struct { UpdaterBase[cloudmodel.Region, mysql.Region, *cache.Region] }
type ResourceUpdater ¶
type ResourceUpdater interface { // 以资源的lcuuid为key,逐一检查cloud数据 // 若cache的diff base中不存在,则添加 // 若cache的diff base中存在,基于可更新字段,检查cloud数据是否发生变化,若发生变化,则更新; // 无论已存在资源有无变化,根据cache的sequence更新的diff base中的sequence,用于标记资源是否需要被删除 HandleAddAndUpdate() // 逐一检查diff base中的资源,若sequence不等于cache中的sequence,则删除 HandleDelete() }
ResourceUpdater 实现资源进行新旧数据比对,并根据比对结果增删改资源
type RoutingTable ¶
type RoutingTable struct { UpdaterBase[cloudmodel.RoutingTable, mysql.RoutingTable, *cache.RoutingTable] }
func NewRoutingTable ¶
func NewRoutingTable(wholeCache *cache.Cache, cloudData []cloudmodel.RoutingTable) *RoutingTable
type SecurityGroup ¶
type SecurityGroup struct { UpdaterBase[cloudmodel.SecurityGroup, mysql.SecurityGroup, *cache.SecurityGroup] }
func NewSecurityGroup ¶
func NewSecurityGroup(wholeCache *cache.Cache, cloudData []cloudmodel.SecurityGroup) *SecurityGroup
type SecurityGroupRule ¶
type SecurityGroupRule struct { UpdaterBase[cloudmodel.SecurityGroupRule, mysql.SecurityGroupRule, *cache.SecurityGroupRule] }
func NewSecurityGroupRule ¶
func NewSecurityGroupRule(wholeCache *cache.Cache, cloudData []cloudmodel.SecurityGroupRule) *SecurityGroupRule
type SubDomain ¶
type SubDomain struct { UpdaterBase[cloudmodel.SubDomain, mysql.SubDomain, *cache.SubDomain] }
func NewSubDomain ¶
func NewSubDomain(wholeCache *cache.Cache, cloudData []cloudmodel.SubDomain) *SubDomain
type Subnet ¶
type Subnet struct { UpdaterBase[cloudmodel.Subnet, mysql.Subnet, *cache.Subnet] }
type UpdaterBase ¶
type UpdaterBase[CT constraint.CloudModel, MT constraint.MySQLModel, BT constraint.DiffBase[MT]] struct { // contains filtered or unexported fields }
func (*UpdaterBase[CT, MT, BT]) HandleAddAndUpdate ¶
func (u *UpdaterBase[CT, MT, BT]) HandleAddAndUpdate()
func (*UpdaterBase[CT, MT, BT]) HandleDelete ¶
func (u *UpdaterBase[CT, MT, BT]) HandleDelete()
func (*UpdaterBase[CT, MT, BT]) RegisterCallbacks ¶
func (u *UpdaterBase[CT, MT, BT]) RegisterCallbacks(onAdded func(addedDBItems []*MT), onUpdated func(cloudItem *CT, diffBaseItem BT), onDeleted func(lcuuids []string))
type VInterface ¶
type VInterface struct { UpdaterBase[cloudmodel.VInterface, mysql.VInterface, *cache.VInterface] }
func NewVInterface ¶
func NewVInterface(wholeCache *cache.Cache, cloudData []cloudmodel.VInterface, domainToolDataSet *cache.ToolDataSet) *VInterface
type VM ¶
type VM struct { UpdaterBase[cloudmodel.VM, mysql.VM, *cache.VM] }
type VMPodNodeConnection ¶
type VMPodNodeConnection struct { UpdaterBase[cloudmodel.VMPodNodeConnection, mysql.VMPodNodeConnection, *cache.VMPodNodeConnection] }
func NewVMPodNodeConnection ¶
func NewVMPodNodeConnection(wholeCache *cache.Cache, cloudData []cloudmodel.VMPodNodeConnection) *VMPodNodeConnection
type VMSecurityGroup ¶
type VMSecurityGroup struct { UpdaterBase[cloudmodel.VMSecurityGroup, mysql.VMSecurityGroup, *cache.VMSecurityGroup] }
func NewVMSecurityGroup ¶
func NewVMSecurityGroup(wholeCache *cache.Cache, cloudData []cloudmodel.VMSecurityGroup) *VMSecurityGroup
type VPC ¶
type VPC struct { UpdaterBase[cloudmodel.VPC, mysql.VPC, *cache.VPC] }
type VRouter ¶
type VRouter struct { UpdaterBase[cloudmodel.VRouter, mysql.VRouter, *cache.VRouter] }
func NewVRouter ¶
func NewVRouter(wholeCache *cache.Cache, cloudData []cloudmodel.VRouter) *VRouter
type WANIP ¶
type WANIP struct { UpdaterBase[cloudmodel.IP, mysql.WANIP, *cache.WANIP] }
func (*WANIP) SetCloudData ¶
func (i *WANIP) SetCloudData(cloudData []cloudmodel.IP)
Source Files ¶
- az.go
- cen.go
- dhcp_port.go
- floating_ip.go
- host.go
- ip.go
- lan_ip.go
- lb.go
- lb_listener.go
- lb_target_server.go
- lb_vm_connection.go
- logger.go
- nat_gateway.go
- nat_rule.go
- nat_vm_connection.go
- network.go
- peer_connection.go
- pod.go
- pod_cluster.go
- pod_group.go
- pod_group_port.go
- pod_ingress.go
- pod_ingress_rule.go
- pod_ingress_rule_backend.go
- pod_namespace.go
- pod_node.go
- pod_replica_set.go
- pod_service.go
- pod_service_port.go
- process.go
- rds_instance.go
- redis_instance.go
- region.go
- routing_table.go
- security_group.go
- security_group_rule.go
- sub_domain.go
- subnet.go
- updatable_field.go
- updater.go
- vinterface.go
- vm.go
- vm_pod_node_connection.go
- vm_security_group.go
- vpc.go
- vrouter.go
- wan_ip.go
Click to show internal directories.
Click to hide internal directories.