cache

package
v0.0.0-...-9634a1a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AZ

type AZ struct {
	DiffBase
	Name         string `json:"name"`
	Label        string `json:"label"`
	RegionLcuuid string `json:"region_lcuuid"`
}

func (*AZ) Update

func (a *AZ) Update(cloudItem *cloudmodel.AZ)

type CEN

type CEN struct {
	DiffBase
	Name       string   `json:"name"`
	VPCLcuuids []string `json:"vpc_lcuuids"`
}

func (*CEN) Update

func (c *CEN) Update(cloudItem *cloudmodel.CEN)

type Cache

type Cache struct {
	Sequence        int // 缓存的序列标识,根据刷新递增;为debug方便,设置为公有属性,需避免直接修改值,使用接口修改
	DomainLcuuid    string
	SubDomainLcuuid string
	DiffBaseDataSet
	ToolDataSet
}

func NewCache

func NewCache(domainLcuuid string) *Cache

func (*Cache) AddAZ

func (c *Cache) AddAZ(item *mysql.AZ)

func (*Cache) AddAZs

func (c *Cache) AddAZs(items []*mysql.AZ)

func (*Cache) AddCENs

func (c *Cache) AddCENs(items []*mysql.CEN)

func (*Cache) AddDHCPPorts

func (c *Cache) AddDHCPPorts(items []*mysql.DHCPPort)

func (*Cache) AddFloatingIPs

func (c *Cache) AddFloatingIPs(items []*mysql.FloatingIP)

func (*Cache) AddHost

func (c *Cache) AddHost(item *mysql.Host)

func (*Cache) AddHosts

func (c *Cache) AddHosts(items []*mysql.Host)

func (*Cache) AddLANIPs

func (c *Cache) AddLANIPs(items []*mysql.LANIP)

func (*Cache) AddLBListeners

func (c *Cache) AddLBListeners(items []*mysql.LBListener)

func (*Cache) AddLBTargetServers

func (c *Cache) AddLBTargetServers(items []*mysql.LBTargetServer)

func (*Cache) AddLBVMConnections

func (c *Cache) AddLBVMConnections(items []*mysql.LBVMConnection)

func (*Cache) AddLBs

func (c *Cache) AddLBs(items []*mysql.LB)

func (*Cache) AddNATGateways

func (c *Cache) AddNATGateways(items []*mysql.NATGateway)

func (*Cache) AddNATRules

func (c *Cache) AddNATRules(items []*mysql.NATRule)

func (*Cache) AddNATVMConnections

func (c *Cache) AddNATVMConnections(items []*mysql.NATVMConnection)

func (*Cache) AddNetwork

func (c *Cache) AddNetwork(item *mysql.Network)

func (*Cache) AddNetworks

func (c *Cache) AddNetworks(items []*mysql.Network)

func (*Cache) AddPeerConnections

func (c *Cache) AddPeerConnections(items []*mysql.PeerConnection)

func (*Cache) AddPodClusters

func (c *Cache) AddPodClusters(items []*mysql.PodCluster)

func (*Cache) AddPodGroupPorts

func (c *Cache) AddPodGroupPorts(items []*mysql.PodGroupPort)

func (*Cache) AddPodGroups

func (c *Cache) AddPodGroups(items []*mysql.PodGroup)

func (*Cache) AddPodIngress

func (c *Cache) AddPodIngress(item *mysql.PodIngress)

func (*Cache) AddPodIngressRuleBackends

func (c *Cache) AddPodIngressRuleBackends(items []*mysql.PodIngressRuleBackend)

func (*Cache) AddPodIngressRules

func (c *Cache) AddPodIngressRules(items []*mysql.PodIngressRule)

func (*Cache) AddPodIngresses

func (c *Cache) AddPodIngresses(items []*mysql.PodIngress)

func (*Cache) AddPodNamespaces

func (c *Cache) AddPodNamespaces(items []*mysql.PodNamespace)

func (*Cache) AddPodNodes

func (c *Cache) AddPodNodes(items []*mysql.PodNode)

func (*Cache) AddPodReplicaSets

func (c *Cache) AddPodReplicaSets(items []*mysql.PodReplicaSet)

func (*Cache) AddPodService

func (c *Cache) AddPodService(item *mysql.PodService)

func (*Cache) AddPodServicePorts

func (c *Cache) AddPodServicePorts(items []*mysql.PodServicePort)

func (*Cache) AddPodServices

func (c *Cache) AddPodServices(items []*mysql.PodService)

func (*Cache) AddPods

func (c *Cache) AddPods(items []*mysql.Pod)

func (*Cache) AddProcesses

func (c *Cache) AddProcesses(items []*mysql.Process)

func (*Cache) AddRDSInstances

func (c *Cache) AddRDSInstances(items []*mysql.RDSInstance)

func (*Cache) AddRedisInstances

func (c *Cache) AddRedisInstances(items []*mysql.RedisInstance)

func (*Cache) AddRegion

func (c *Cache) AddRegion(item *mysql.Region)

func (*Cache) AddRegions

func (c *Cache) AddRegions(items []*mysql.Region)

func (*Cache) AddRoutingTables

func (c *Cache) AddRoutingTables(items []*mysql.RoutingTable)

func (*Cache) AddSecurityGroup

func (c *Cache) AddSecurityGroup(item *mysql.SecurityGroup)

func (*Cache) AddSecurityGroupRules

func (c *Cache) AddSecurityGroupRules(items []*mysql.SecurityGroupRule)

func (*Cache) AddSecurityGroups

func (c *Cache) AddSecurityGroups(items []*mysql.SecurityGroup)

func (*Cache) AddSubDomain

func (c *Cache) AddSubDomain(item *mysql.SubDomain)

func (*Cache) AddSubDomains

func (c *Cache) AddSubDomains(items []*mysql.SubDomain)

func (*Cache) AddSubnets

func (c *Cache) AddSubnets(items []*mysql.Subnet)

func (*Cache) AddVInterfaces

func (c *Cache) AddVInterfaces(items []*mysql.VInterface)

func (*Cache) AddVM

func (c *Cache) AddVM(item *mysql.VM)

func (*Cache) AddVMPodNodeConnections

func (c *Cache) AddVMPodNodeConnections(items []*mysql.VMPodNodeConnection)

func (*Cache) AddVMSecurityGroups

func (c *Cache) AddVMSecurityGroups(items []*mysql.VMSecurityGroup)

func (*Cache) AddVMs

func (c *Cache) AddVMs(items []*mysql.VM)

func (*Cache) AddVPCs

func (c *Cache) AddVPCs(items []*mysql.VPC)

func (*Cache) AddVRouter

func (c *Cache) AddVRouter(item *mysql.VRouter)

func (*Cache) AddVRouters

func (c *Cache) AddVRouters(items []*mysql.VRouter)

func (*Cache) AddWANIPs

func (c *Cache) AddWANIPs(items []*mysql.WANIP)

func (*Cache) DeleteAZ

func (c *Cache) DeleteAZ(lcuuid string)

func (*Cache) DeleteAZs

func (c *Cache) DeleteAZs(lcuuids []string)

func (*Cache) DeleteCENs

func (c *Cache) DeleteCENs(lcuuids []string)

func (*Cache) DeleteDHCPPorts

func (c *Cache) DeleteDHCPPorts(lcuuids []string)

func (*Cache) DeleteFloatingIPs

func (c *Cache) DeleteFloatingIPs(lcuuids []string)

func (*Cache) DeleteHost

func (c *Cache) DeleteHost(lcuuid string)

func (*Cache) DeleteHosts

func (c *Cache) DeleteHosts(lcuuids []string)

func (*Cache) DeleteLANIPs

func (c *Cache) DeleteLANIPs(lcuuids []string)

func (*Cache) DeleteLBListeners

func (c *Cache) DeleteLBListeners(lcuuids []string)

func (*Cache) DeleteLBTargetServers

func (c *Cache) DeleteLBTargetServers(lcuuids []string)

func (*Cache) DeleteLBVMConnections

func (c *Cache) DeleteLBVMConnections(lcuuids []string)

func (*Cache) DeleteLBs

func (c *Cache) DeleteLBs(lcuuids []string)

func (*Cache) DeleteNATGateways

func (c *Cache) DeleteNATGateways(lcuuids []string)

func (*Cache) DeleteNATRules

func (c *Cache) DeleteNATRules(lcuuids []string)

func (*Cache) DeleteNATVMConnections

func (c *Cache) DeleteNATVMConnections(lcuuids []string)

func (*Cache) DeleteNetworks

func (c *Cache) DeleteNetworks(lcuuids []string)

func (*Cache) DeletePeerConnections

func (c *Cache) DeletePeerConnections(lcuuids []string)

func (*Cache) DeletePodClusters

func (c *Cache) DeletePodClusters(lcuuids []string)

func (*Cache) DeletePodGroupPorts

func (c *Cache) DeletePodGroupPorts(lcuuids []string)

func (*Cache) DeletePodGroups

func (c *Cache) DeletePodGroups(lcuuids []string)

func (*Cache) DeletePodIngressRuleBackends

func (c *Cache) DeletePodIngressRuleBackends(lcuuids []string)

func (*Cache) DeletePodIngressRules

func (c *Cache) DeletePodIngressRules(lcuuids []string)

func (*Cache) DeletePodIngresses

func (c *Cache) DeletePodIngresses(lcuuids []string)

func (*Cache) DeletePodNamespaces

func (c *Cache) DeletePodNamespaces(lcuuids []string)

func (*Cache) DeletePodNodes

func (c *Cache) DeletePodNodes(lcuuids []string)

func (*Cache) DeletePodReplicaSets

func (c *Cache) DeletePodReplicaSets(lcuuids []string)

func (*Cache) DeletePodServicePorts

func (c *Cache) DeletePodServicePorts(lcuuids []string)

func (*Cache) DeletePodServices

func (c *Cache) DeletePodServices(lcuuids []string)

func (*Cache) DeletePods

func (c *Cache) DeletePods(lcuuids []string)

func (*Cache) DeleteProcesses

func (c *Cache) DeleteProcesses(lcuuids []string)

func (*Cache) DeleteRDSInstances

func (c *Cache) DeleteRDSInstances(lcuuids []string)

func (*Cache) DeleteRedisInstances

func (c *Cache) DeleteRedisInstances(lcuuids []string)

func (*Cache) DeleteRegion

func (c *Cache) DeleteRegion(lcuuid string)

func (*Cache) DeleteRegions

func (c *Cache) DeleteRegions(lcuuids []string)

func (*Cache) DeleteRoutingTables

func (c *Cache) DeleteRoutingTables(lcuuids []string)

func (*Cache) DeleteSecurityGroupRules

func (c *Cache) DeleteSecurityGroupRules(lcuuids []string)

func (*Cache) DeleteSecurityGroups

func (c *Cache) DeleteSecurityGroups(lcuuids []string)

func (*Cache) DeleteSubDomain

func (c *Cache) DeleteSubDomain(lcuuid string)

func (*Cache) DeleteSubDomains

func (c *Cache) DeleteSubDomains(lcuuids []string)

func (*Cache) DeleteSubnets

func (c *Cache) DeleteSubnets(lcuuids []string)

func (*Cache) DeleteVInterfaces

func (c *Cache) DeleteVInterfaces(lcuuids []string)

func (*Cache) DeleteVM

func (c *Cache) DeleteVM(lcuuid string)

func (*Cache) DeleteVMPodNodeConnections

func (c *Cache) DeleteVMPodNodeConnections(lcuuids []string)

func (*Cache) DeleteVMSecurityGroups

func (c *Cache) DeleteVMSecurityGroups(lcuuids []string)

func (*Cache) DeleteVMs

func (c *Cache) DeleteVMs(lcuuids []string)

func (*Cache) DeleteVPCs

func (c *Cache) DeleteVPCs(lcuuids []string)

func (*Cache) DeleteVRouters

func (c *Cache) DeleteVRouters(lcuuids []string)

func (*Cache) DeleteWANIPs

func (c *Cache) DeleteWANIPs(lcuuids []string)

func (*Cache) GetSequence

func (c *Cache) GetSequence() int

func (*Cache) Refresh

func (c *Cache) Refresh()

所有缓存的刷新入口

func (*Cache) SetSequence

func (c *Cache) SetSequence(sequence int)

func (*Cache) UpdateDHCPPort

func (c *Cache) UpdateDHCPPort(cloudItem *cloudmodel.DHCPPort)

func (*Cache) UpdateHost

func (c *Cache) UpdateHost(cloudItem *cloudmodel.Host)

func (*Cache) UpdateLB

func (c *Cache) UpdateLB(cloudItem *cloudmodel.LB)

func (*Cache) UpdateNATGateway

func (c *Cache) UpdateNATGateway(cloudItem *cloudmodel.NATGateway)

func (*Cache) UpdateNetwork

func (c *Cache) UpdateNetwork(cloudItem *cloudmodel.Network)

func (*Cache) UpdatePod

func (c *Cache) UpdatePod(cloudItem *cloudmodel.Pod)

func (*Cache) UpdatePodNode

func (c *Cache) UpdatePodNode(cloudItem *cloudmodel.PodNode)

func (*Cache) UpdatePodService

func (c *Cache) UpdatePodService(cloudItem *cloudmodel.PodService)

func (*Cache) UpdateRDSInstance

func (c *Cache) UpdateRDSInstance(cloudItem *cloudmodel.RDSInstance)

func (*Cache) UpdateRedisInstance

func (c *Cache) UpdateRedisInstance(cloudItem *cloudmodel.RedisInstance)

func (*Cache) UpdateVInterface

func (c *Cache) UpdateVInterface(cloudItem *cloudmodel.VInterface)

func (*Cache) UpdateVM

func (c *Cache) UpdateVM(cloudItem *cloudmodel.VM)

func (*Cache) UpdateVRouter

func (c *Cache) UpdateVRouter(cloudItem *cloudmodel.VRouter)

type CacheManager

type CacheManager struct {
	DomainCache       *Cache
	SubDomainCacheMap map[string]*Cache
}

为支持domain及其sub_domain的独立刷新,将缓存拆分成对应的独立Cache

func NewCacheManager

func NewCacheManager(domainLcuuid string) *CacheManager

func (*CacheManager) CreateSubDomainCacheIfNotExists

func (m *CacheManager) CreateSubDomainCacheIfNotExists(subDomainLcuuid string) *Cache

func (*CacheManager) Refresh

func (m *CacheManager) Refresh()

func (*CacheManager) UpdateSequence

func (m *CacheManager) UpdateSequence()

sequence随cache刷新次数递增

type DHCPPort

type DHCPPort struct {
	DiffBase
	Name         string `json:"name"`
	RegionLcuuid string `json:"region_lcuuid"`
	AZLcuuid     string `json:"az_lcuuid"`
	VPCLcuuid    string `json:"vpc_lcuuid"`
}

func (*DHCPPort) Update

func (d *DHCPPort) Update(cloudItem *cloudmodel.DHCPPort)

type DiffBase

type DiffBase struct {
	Sequence int    `json:"sequence"`
	Lcuuid   string `json:"lcuuid"`
}

func (*DiffBase) GetLcuuid

func (d *DiffBase) GetLcuuid() string

func (*DiffBase) GetSequence

func (d *DiffBase) GetSequence() int

func (*DiffBase) SetSequence

func (d *DiffBase) SetSequence(sequence int)

type DiffBaseDataSet

type DiffBaseDataSet struct {
	Regions                map[string]*Region
	AZs                    map[string]*AZ
	SubDomains             map[string]*SubDomain
	Hosts                  map[string]*Host
	VMs                    map[string]*VM
	VPCs                   map[string]*VPC
	Networks               map[string]*Network
	Subnets                map[string]*Subnet
	VRouters               map[string]*VRouter
	RoutingTables          map[string]*RoutingTable
	DHCPPorts              map[string]*DHCPPort
	VInterfaces            map[string]*VInterface
	WANIPs                 map[string]*WANIP
	LANIPs                 map[string]*LANIP
	FloatingIPs            map[string]*FloatingIP
	SecurityGroups         map[string]*SecurityGroup
	SecurityGroupRules     map[string]*SecurityGroupRule
	VMSecurityGroups       map[string]*VMSecurityGroup
	NATGateways            map[string]*NATGateway
	NATVMConnections       map[string]*NATVMConnection
	NATRules               map[string]*NATRule
	LBs                    map[string]*LB
	LBVMConnections        map[string]*LBVMConnection
	LBListeners            map[string]*LBListener
	LBTargetServers        map[string]*LBTargetServer
	PeerConnections        map[string]*PeerConnection
	CENs                   map[string]*CEN
	RDSInstances           map[string]*RDSInstance
	RedisInstances         map[string]*RedisInstance
	PodClusters            map[string]*PodCluster
	PodNodes               map[string]*PodNode
	VMPodNodeConnections   map[string]*VMPodNodeConnection
	PodNamespaces          map[string]*PodNamespace
	PodIngresses           map[string]*PodIngress
	PodIngressRules        map[string]*PodIngressRule
	PodIngressRuleBackends map[string]*PodIngressRuleBackend
	PodServices            map[string]*PodService
	PodServicePorts        map[string]*PodServicePort
	PodGroups              map[string]*PodGroup
	PodGroupPorts          map[string]*PodGroupPort
	PodReplicaSets         map[string]*PodReplicaSet
	Pods                   map[string]*Pod
	Process                map[string]*Process
}

所有资源的主要信息,用于与cloud数据比较差异,根据差异更新资源 应保持字段定义与cloud字段定义一致,用于在比较资源时可以抽象方法

func NewDiffBaseDataSet

func NewDiffBaseDataSet() DiffBaseDataSet

type EventToolDataSet

type EventToolDataSet struct {
	// contains filtered or unexported fields
}

func NewEventToolDataSet

func NewEventToolDataSet() EventToolDataSet

func (*EventToolDataSet) GetPodIPNetworkMapByID

func (t *EventToolDataSet) GetPodIPNetworkMapByID(id int) (map[IPKey]int, bool)

func (*EventToolDataSet) GetProcessInfoByLcuuid

func (t *EventToolDataSet) GetProcessInfoByLcuuid(lcuuid string) (*processInfo, bool)

func (*EventToolDataSet) GetVMIPNetworkMapByID

func (t *EventToolDataSet) GetVMIPNetworkMapByID(id int) (map[IPKey]int, bool)

type FloatingIP

type FloatingIP struct {
	DiffBase
	RegionLcuuid string `json:"region_lcuuid"`
	VPCLcuuid    string `json:"vpc_lcuuid"`
}

func (*FloatingIP) Update

func (f *FloatingIP) Update(cloudItem *cloudmodel.FloatingIP)

type Host

type Host struct {
	DiffBase
	Name         string `json:"name"`
	IP           string `json:"ip"`
	HType        int    `json:"htype"`
	VCPUNum      int    `json:"vcpu_num"`
	MemTotal     int    `json:"mem_total"`
	ExtraInfo    string `json:"extra_info"`
	RegionLcuuid string `json:"region_lcuuid"`
	AZLcuuid     string `json:"az_lcuuid"`
}

func (*Host) Update

func (h *Host) Update(cloudItem *cloudmodel.Host)

type IPKey

type IPKey struct {
	IP     string
	Lcuuid string
}

type LANIP

type LANIP struct {
	DiffBase
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
	SubnetLcuuid    string `json:"subnet_lcuuid"`
}

func (*LANIP) Update

func (l *LANIP) Update(cloudItem *cloudmodel.IP)

type LB

type LB struct {
	DiffBase
	Name         string `json:"name"`
	Model        int    `json:"model"`
	VIP          string `json:"vip"`
	VPCLcuuid    string `json:"vpc_lcuuid"`
	RegionLcuuid string `json:"region_lcuuid"`
}

func (*LB) Update

func (l *LB) Update(cloudItem *cloudmodel.LB)

type LBListener

type LBListener struct {
	DiffBase
	Name     string `json:"name"`
	IPs      string `json:"ips"`
	SNATIPs  string `json:"snat_ips"`
	Port     int    `json:"port"`
	Protocol string `json:"protocal"`
}

func (*LBListener) Update

func (l *LBListener) Update(cloudItem *cloudmodel.LBListener)

type LBTargetServer

type LBTargetServer struct {
	DiffBase
	IP       string `json:"ip"`
	Port     int    `json:"port"`
	Protocol string `json:"protocal"`
}

func (*LBTargetServer) Update

func (l *LBTargetServer) Update(cloudItem *cloudmodel.LBTargetServer)

type LBVMConnection

type LBVMConnection struct {
	DiffBase
}

type NATGateway

type NATGateway struct {
	DiffBase
	Name         string `json:"name"`
	FloatingIPs  string `json:"floating_ips"`
	RegionLcuuid string `json:"region_lcuuid"`
}

func (*NATGateway) Update

func (n *NATGateway) Update(cloudItem *cloudmodel.NATGateway)

type NATRule

type NATRule struct {
	DiffBase
}

type NATVMConnection

type NATVMConnection struct {
	DiffBase
}

type Network

type Network struct {
	DiffBase
	Name            string `json:"name"`
	Label           string `json:"label"`
	TunnelID        int    `json:"tunnel_id"`
	NetType         int    `json:"net_type"`
	SegmentationID  int    `json:"segmentation_id"`
	VPCLcuuid       string `json:"vpc_lcuuid"`
	RegionLcuuid    string `json:"region_lcuuid"`
	AZLcuuid        string `json:"az_lcuuid"`
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*Network) Update

func (n *Network) Update(cloudItem *cloudmodel.Network)

type PeerConnection

type PeerConnection struct {
	DiffBase
	Name               string `json:"name"`
	RemoteRegionLcuuid string `json:"remote_region_lcuuid"`
	LocalRegionLcuuid  string `json:"local_region_lcuuid"`
}

func (*PeerConnection) Update

func (p *PeerConnection) Update(cloudItem *cloudmodel.PeerConnection)

type Pod

type Pod struct {
	DiffBase
	Name                string    `json:"name"`
	Label               string    `json:"label"`
	State               int       `json:"state"`
	CreatedAt           time.Time `json:"created_at"`
	PodNodeLcuuid       string    `json:"pod_node_lcuuid"`
	PodReplicaSetLcuuid string    `json:"pod_replica_set_lcuuid"`
	VPCLcuuid           string    `json:"vpc_lcuuid"`
	RegionLcuuid        string    `json:"region_lcuuid"`
	AZLcuuid            string    `json:"az_lcuuid"`
	SubDomainLcuuid     string    `json:"sub_domain_lcuuid"`
}

func (*Pod) Update

func (p *Pod) Update(cloudItem *cloudmodel.Pod)

type PodCluster

type PodCluster struct {
	DiffBase
	Name            string `json:"name"`
	ClusterName     string `json:"cluster_name"`
	RegionLcuuid    string `json:"region_lcuuid"`
	AZLcuuid        string `json:"az_lcuuid"`
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*PodCluster) Update

func (p *PodCluster) Update(cloudItem *cloudmodel.PodCluster)

type PodGroup

type PodGroup struct {
	DiffBase
	Name            string `json:"name"`
	Label           string `json:"label"`
	PodNum          int    `json:"pod_num"`
	Type            int    `json:"type"`
	RegionLcuuid    string `json:"region_lcuuid"`
	AZLcuuid        string `json:"az_lcuuid"`
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*PodGroup) Update

func (p *PodGroup) Update(cloudItem *cloudmodel.PodGroup)

type PodGroupPort

type PodGroupPort struct {
	DiffBase
	Name            string `json:"name"`
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*PodGroupPort) Update

func (p *PodGroupPort) Update(cloudItem *cloudmodel.PodGroupPort)

type PodIngress

type PodIngress struct {
	DiffBase
	Name            string `json:"name"`
	RegionLcuuid    string `json:"region_lcuuid"`
	AZLcuuid        string `json:"az_lcuuid"`
	SubDomainLcuuid string `json:"sub_domain_lcuu"`
}

func (*PodIngress) Update

func (p *PodIngress) Update(cloudItem *cloudmodel.PodIngress)

type PodIngressRule

type PodIngressRule struct {
	DiffBase
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*PodIngressRule) Update

func (p *PodIngressRule) Update(cloudItem *cloudmodel.PodIngressRule)

type PodIngressRuleBackend

type PodIngressRuleBackend struct {
	DiffBase
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*PodIngressRuleBackend) Update

type PodNamespace

type PodNamespace struct {
	DiffBase
	RegionLcuuid    string `json:"region_lcuuid"`
	AZLcuuid        string `json:"az_lcuuid"`
	SubDomainLcuuid string `json:"sub_domain_lcuu"`
	CloudTags       string `json:"cloud_tags"`
}

func (*PodNamespace) Update

func (p *PodNamespace) Update(cloudItem *cloudmodel.PodNamespace)

type PodNode

type PodNode struct {
	DiffBase
	State           int    `json:"state"`
	VCPUNum         int    `json:"vcpu_num"`
	MemTotal        int    `json:"mem_total"`
	RegionLcuuid    string `json:"region_lcuuid"`
	AZLcuuid        string `json:"az_lcuuid"`
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*PodNode) Update

func (p *PodNode) Update(cloudItem *cloudmodel.PodNode)

type PodReplicaSet

type PodReplicaSet struct {
	DiffBase
	Name            string `json:"name"`
	Label           string `json:"label"`
	PodNum          int    `json:"pod_num"`
	RegionLcuuid    string `json:"region_lcuuid"`
	AZLcuuid        string `json:"az_lcuuid"`
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*PodReplicaSet) Update

func (p *PodReplicaSet) Update(cloudItem *cloudmodel.PodReplicaSet)

type PodService

type PodService struct {
	DiffBase
	Name             string `json:"name"`
	Selector         string `json:"selector"`
	ServiceClusterIP string `json:"service_cluster_ip"`
	PodIngressLcuuid string `json:"pod_ingress_lcuuid"`
	RegionLcuuid     string `json:"region_lcuuid"`
	AZLcuuid         string `json:"az_lcuuid"`
	SubDomainLcuuid  string `json:"sub_domain_lcuuid"`
}

func (*PodService) Update

func (p *PodService) Update(cloudItem *cloudmodel.PodService)

type PodServicePort

type PodServicePort struct {
	DiffBase
	Name            string `json:"name"`
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*PodServicePort) Update

func (p *PodServicePort) Update(cloudItem *cloudmodel.PodServicePort)

type Process

type Process struct {
	DiffBase
	Name      string `json:"name"`
	OSAPPTags string `json:"os_app_tags"`
}

func (*Process) Update

func (p *Process) Update(cloudItem *cloudmodel.Process)

type RDSInstance

type RDSInstance struct {
	DiffBase
	Name         string `json:"name"`
	State        int    `json:"state"`
	Series       int    `json:"series"`
	Model        int    `json:"model"`
	VPCLcuuid    string `json:"vpc_lcuuid"`
	RegionLcuuid string `json:"region_lcuuid"`
	AZLcuuid     string `json:"az_lcuuid"`
}

func (*RDSInstance) Update

func (r *RDSInstance) Update(cloudItem *cloudmodel.RDSInstance)

type RedisInstance

type RedisInstance struct {
	DiffBase
	Name         string `json:"name"`
	State        int    `json:"state"`
	PublicHost   string `json:"public_host"`
	RegionLcuuid string `json:"region_lcuuid"`
	AZLcuuid     string `json:"az_lcuuid"`
}

func (*RedisInstance) Update

func (r *RedisInstance) Update(cloudItem *cloudmodel.RedisInstance)

type Region

type Region struct {
	DiffBase
	Name  string `json:"name"`
	Label string `json:"label"`
}

func (*Region) Update

func (r *Region) Update(cloudItem *cloudmodel.Region)

type RoutingTable

type RoutingTable struct {
	DiffBase
	Destination string `json:"destination"`
	Nexthop     string `json:"nexthop"`
	NexthopType string `json:"nexthop_type"`
}

func (*RoutingTable) Update

func (r *RoutingTable) Update(cloudItem *cloudmodel.RoutingTable)

type SecurityGroup

type SecurityGroup struct {
	DiffBase
	Name         string `json:"name"`
	Label        string `json:"label"`
	RegionLcuuid string `json:"region_lcuuid"`
}

func (*SecurityGroup) Update

func (s *SecurityGroup) Update(cloudItem *cloudmodel.SecurityGroup)

type SecurityGroupRule

type SecurityGroupRule struct {
	DiffBase
	Priority        int    `json:"priority"`
	EtherType       int    `json:"ether_type"`
	Local           string `json:"local"`
	Remote          string `json:"remote"`
	RemotePortRange string `json:"remote_port_range"`
}

func (*SecurityGroupRule) Update

func (s *SecurityGroupRule) Update(cloudItem *cloudmodel.SecurityGroupRule)

type SubDomain

type SubDomain struct {
	DiffBase
	Name string `json:"name"`
}

func (*SubDomain) Update

func (s *SubDomain) Update(cloudItem *cloudmodel.SubDomain)

type Subnet

type Subnet struct {
	DiffBase
	Name            string `json:"name"`
	Label           string `json:"label"`
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*Subnet) Update

func (s *Subnet) Update(cloudItem *cloudmodel.Subnet)

type ToolDataSet

type ToolDataSet struct {
	// 仅资源变更事件所需的数据
	EventToolDataSet
	// contains filtered or unexported fields
}

各类资源的映射关系,用于刷新资源时,转换所需数据

func NewToolDataSet

func NewToolDataSet() ToolDataSet

func (*ToolDataSet) GetAZIDByLcuuid

func (t *ToolDataSet) GetAZIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetDHCPPortIDByLcuuid

func (t *ToolDataSet) GetDHCPPortIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetDHCPPortInfoByID

func (t *ToolDataSet) GetDHCPPortInfoByID(id int) (*dhcpPortInfo, error)

func (*ToolDataSet) GetDHCPPortNameByID

func (t *ToolDataSet) GetDHCPPortNameByID(id int) (string, error)

func (*ToolDataSet) GetDeviceIDByDeviceLcuuid

func (t *ToolDataSet) GetDeviceIDByDeviceLcuuid(deviceType int, deviceLcuuid string) (int, bool)

func (*ToolDataSet) GetDeviceIDByVInterfaceLcuuid

func (t *ToolDataSet) GetDeviceIDByVInterfaceLcuuid(vifLcuuid string) (int, bool)

func (*ToolDataSet) GetDeviceNameByDeviceID

func (t *ToolDataSet) GetDeviceNameByDeviceID(deviceType, deviceID int) (string, error)

func (*ToolDataSet) GetDeviceTypeByVInterfaceLcuuid

func (t *ToolDataSet) GetDeviceTypeByVInterfaceLcuuid(vifLcuuid string) (int, bool)

func (*ToolDataSet) GetHostIDByIP

func (t *ToolDataSet) GetHostIDByIP(ip string) (int, bool)

func (*ToolDataSet) GetHostIDByLcuuid

func (t *ToolDataSet) GetHostIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetHostInfoByID

func (t *ToolDataSet) GetHostInfoByID(id int) (*hostInfo, error)

func (*ToolDataSet) GetHostNameByID

func (t *ToolDataSet) GetHostNameByID(id int) (string, error)

func (*ToolDataSet) GetLANIPByLcuuid

func (t *ToolDataSet) GetLANIPByLcuuid(lcuuid string) (string, bool)

func (*ToolDataSet) GetLBIDByLcuuid

func (t *ToolDataSet) GetLBIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetLBInfoByID

func (t *ToolDataSet) GetLBInfoByID(id int) (*lbInfo, error)

func (*ToolDataSet) GetLBListenerIDByLcuuid

func (t *ToolDataSet) GetLBListenerIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetLBNameByID

func (t *ToolDataSet) GetLBNameByID(id int) (string, error)

func (*ToolDataSet) GetNATGatewayIDByLcuuid

func (t *ToolDataSet) GetNATGatewayIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetNATGatewayInfoByID

func (t *ToolDataSet) GetNATGatewayInfoByID(id int) (*natGatewayInfo, error)

func (*ToolDataSet) GetNATGatewayNameByID

func (t *ToolDataSet) GetNATGatewayNameByID(id int) (string, error)

func (*ToolDataSet) GetNetworkIDByLcuuid

func (t *ToolDataSet) GetNetworkIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetNetworkIDByVInterfaceLcuuid

func (t *ToolDataSet) GetNetworkIDByVInterfaceLcuuid(vifLcuuid string) (int, bool)

func (*ToolDataSet) GetNetworkLcuuidByID

func (t *ToolDataSet) GetNetworkLcuuidByID(id int) (string, bool)

func (*ToolDataSet) GetNetworkNameByID

func (t *ToolDataSet) GetNetworkNameByID(id int) (string, bool)

func (*ToolDataSet) GetPodClusterIDByLcuuid

func (t *ToolDataSet) GetPodClusterIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetPodGroupIDByLcuuid

func (t *ToolDataSet) GetPodGroupIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetPodIDByLcuuid

func (t *ToolDataSet) GetPodIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetPodInfoByID

func (t *ToolDataSet) GetPodInfoByID(id int) (*podInfo, error)

func (*ToolDataSet) GetPodIngressIDByLcuuid

func (t *ToolDataSet) GetPodIngressIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetPodIngressLcuuidByID

func (t *ToolDataSet) GetPodIngressLcuuidByID(id int) (string, bool)

func (*ToolDataSet) GetPodIngressRuleIDByLcuuid

func (t *ToolDataSet) GetPodIngressRuleIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetPodNameByID

func (t *ToolDataSet) GetPodNameByID(id int) (string, error)

func (*ToolDataSet) GetPodNamespaceIDByLcuuid

func (t *ToolDataSet) GetPodNamespaceIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetPodNodeIDByLcuuid

func (t *ToolDataSet) GetPodNodeIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetPodNodeIDByVMPodNodeConnectionLcuuid

func (t *ToolDataSet) GetPodNodeIDByVMPodNodeConnectionLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetPodNodeInfoByID

func (t *ToolDataSet) GetPodNodeInfoByID(id int) (*podNodeInfo, error)

func (*ToolDataSet) GetPodNodeLcuuidByID

func (t *ToolDataSet) GetPodNodeLcuuidByID(id int) (string, bool)

func (*ToolDataSet) GetPodNodeNameByID

func (t *ToolDataSet) GetPodNodeNameByID(id int) (string, error)

func (*ToolDataSet) GetPodReplicaSetIDByLcuuid

func (t *ToolDataSet) GetPodReplicaSetIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetPodReplicaSetLcuuidByID

func (t *ToolDataSet) GetPodReplicaSetLcuuidByID(id int) (string, bool)

func (*ToolDataSet) GetPodServiceIDByLcuuid

func (t *ToolDataSet) GetPodServiceIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetPodServiceInfoByID

func (t *ToolDataSet) GetPodServiceInfoByID(id int) (*podServiceInfo, error)

func (*ToolDataSet) GetPodServiceNameByID

func (t *ToolDataSet) GetPodServiceNameByID(id int) (string, error)

func (*ToolDataSet) GetRDSInstanceIDByLcuuid

func (t *ToolDataSet) GetRDSInstanceIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetRDSInstanceInfoByID

func (t *ToolDataSet) GetRDSInstanceInfoByID(id int) (*rdsInstanceInfo, error)

func (*ToolDataSet) GetRDSInstanceNameByID

func (t *ToolDataSet) GetRDSInstanceNameByID(id int) (string, error)

func (*ToolDataSet) GetRedisInstanceIDByLcuuid

func (t *ToolDataSet) GetRedisInstanceIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetRedisInstanceInfoByID

func (t *ToolDataSet) GetRedisInstanceInfoByID(id int) (*redisInstanceInfo, error)

func (*ToolDataSet) GetRedisInstanceNameByID

func (t *ToolDataSet) GetRedisInstanceNameByID(id int) (string, error)

func (*ToolDataSet) GetRegionIDByLcuuid

func (t *ToolDataSet) GetRegionIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetRegionLcuuidByID

func (t *ToolDataSet) GetRegionLcuuidByID(id int) (string, bool)

func (*ToolDataSet) GetSecurityGroupIDByLcuuid

func (t *ToolDataSet) GetSecurityGroupIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetSubnetIDByLcuuid

func (t *ToolDataSet) GetSubnetIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetSubnetLcuuidByID

func (t *ToolDataSet) GetSubnetLcuuidByID(id int) (string, bool)

func (*ToolDataSet) GetVInterfaceIDByLANIPLcuuid

func (t *ToolDataSet) GetVInterfaceIDByLANIPLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetVInterfaceIDByLcuuid

func (t *ToolDataSet) GetVInterfaceIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetVInterfaceIDByWANIPLcuuid

func (t *ToolDataSet) GetVInterfaceIDByWANIPLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetVInterfaceLcuuidByID

func (t *ToolDataSet) GetVInterfaceLcuuidByID(id int) (string, bool)

func (*ToolDataSet) GetVInterfaceTypeByLcuuid

func (t *ToolDataSet) GetVInterfaceTypeByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetVMIDByLcuuid

func (t *ToolDataSet) GetVMIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetVMIDByPodNodeID

func (t *ToolDataSet) GetVMIDByPodNodeID(podNodeID int) (int, bool)

func (*ToolDataSet) GetVMInfoByID

func (t *ToolDataSet) GetVMInfoByID(id int) (*vmInfo, error)

func (*ToolDataSet) GetVMNameByID

func (t *ToolDataSet) GetVMNameByID(id int) (string, error)

func (*ToolDataSet) GetVPCIDByLcuuid

func (t *ToolDataSet) GetVPCIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetVPCLcuuidByID

func (t *ToolDataSet) GetVPCLcuuidByID(id int) (string, bool)

func (*ToolDataSet) GetVRouterIDByLcuuid

func (t *ToolDataSet) GetVRouterIDByLcuuid(lcuuid string) (int, bool)

func (*ToolDataSet) GetVRouterInfoByID

func (t *ToolDataSet) GetVRouterInfoByID(id int) (*vrouterInfo, error)

func (*ToolDataSet) GetVRouterNameByID

func (t *ToolDataSet) GetVRouterNameByID(id int) (string, error)

func (*ToolDataSet) GetWANIPByLcuuid

func (t *ToolDataSet) GetWANIPByLcuuid(lcuuid string) (string, bool)

type VInterface

type VInterface struct {
	DiffBase
	Name            string `json:"name"`
	Type            int    `json:"type"`
	TapMac          string `json:"tap_mac"`
	NetworkLcuuid   string `json:"network_lcuuid"`
	RegionLcuuid    string `json:"region_lcuuid"`
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*VInterface) Update

func (v *VInterface) Update(cloudItem *cloudmodel.VInterface)

type VM

type VM struct {
	DiffBase
	Name         string `json:"name"`
	Label        string `json:"label"`
	State        int    `json:"state"`
	HType        int    `json:"htype"`
	LaunchServer string `json:"launch_server"`
	VPCLcuuid    string `json:"vpc_lcuuid"`
	RegionLcuuid string `json:"region_lcuuid"`
	AZLcuuid     string `json:"az_lcuuid"`
	CloudTags    string `json:"cloud_tags"`
}

func (*VM) Update

func (v *VM) Update(cloudItem *cloudmodel.VM)

type VMPodNodeConnection

type VMPodNodeConnection struct {
	DiffBase
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
}

func (*VMPodNodeConnection) Update

func (p *VMPodNodeConnection) Update(cloudItem *cloudmodel.VMPodNodeConnection)

type VMSecurityGroup

type VMSecurityGroup struct {
	DiffBase
	Priority int `json:"priority"`
}

func (*VMSecurityGroup) Update

func (s *VMSecurityGroup) Update(cloudItem *cloudmodel.VMSecurityGroup)

type VPC

type VPC struct {
	DiffBase
	Name         string `json:"name"`
	Label        string `json:"label"`
	TunnelID     int    `json:"tunnel_id"`
	CIDR         string `json:"cidr"`
	RegionLcuuid string `json:"region_lcuuid"`
}

func (*VPC) Update

func (v *VPC) Update(cloudItem *cloudmodel.VPC)

type VRouter

type VRouter struct {
	DiffBase
	Name         string `json:"name"`
	Label        string `json:"label"`
	VPCLcuuid    string `json:"vpc_lcuuid"`
	RegionLcuuid string `json:"region_lcuuid"`
}

func (*VRouter) Update

func (v *VRouter) Update(cloudItem *cloudmodel.VRouter)

type WANIP

type WANIP struct {
	DiffBase
	RegionLcuuid    string `json:"region_lcuuid"`
	SubDomainLcuuid string `json:"sub_domain_lcuuid"`
	SubnetLcuuid    string `json:"subnet_lcuuid"`
}

func (*WANIP) Update

func (w *WANIP) Update(cloudItem *cloudmodel.IP)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL