Documentation ¶
Index ¶
- Constants
- type Cache
- func (c *Cache) AddAZ(item *mysqlmodel.AZ)
- func (c *Cache) AddAZs(items []*mysqlmodel.AZ)
- func (c *Cache) AddCENs(items []*mysqlmodel.CEN)
- func (c *Cache) AddDHCPPorts(items []*mysqlmodel.DHCPPort)
- func (c *Cache) AddFloatingIPs(items []*mysqlmodel.FloatingIP)
- func (c *Cache) AddHost(item *mysqlmodel.Host)
- func (c *Cache) AddHosts(items []*mysqlmodel.Host)
- func (c *Cache) AddLANIPs(items []*mysqlmodel.LANIP)
- func (c *Cache) AddLBListeners(items []*mysqlmodel.LBListener)
- func (c *Cache) AddLBTargetServers(items []*mysqlmodel.LBTargetServer)
- func (c *Cache) AddLBVMConnections(items []*mysqlmodel.LBVMConnection)
- func (c *Cache) AddLBs(items []*mysqlmodel.LB)
- func (c *Cache) AddNATGateways(items []*mysqlmodel.NATGateway)
- func (c *Cache) AddNATRules(items []*mysqlmodel.NATRule)
- func (c *Cache) AddNATVMConnections(items []*mysqlmodel.NATVMConnection)
- func (c *Cache) AddNetwork(item *mysqlmodel.Network)
- func (c *Cache) AddNetworks(items []*mysqlmodel.Network)
- func (c *Cache) AddPeerConnections(items []*mysqlmodel.PeerConnection)
- func (c *Cache) AddPodClusters(items []*mysqlmodel.PodCluster)
- func (c *Cache) AddPodGroupPorts(items []*mysqlmodel.PodGroupPort)
- func (c *Cache) AddPodGroups(items []*mysqlmodel.PodGroup)
- func (c *Cache) AddPodIngress(item *mysqlmodel.PodIngress)
- func (c *Cache) AddPodIngressRuleBackends(items []*mysqlmodel.PodIngressRuleBackend)
- func (c *Cache) AddPodIngressRules(items []*mysqlmodel.PodIngressRule)
- func (c *Cache) AddPodIngresses(items []*mysqlmodel.PodIngress)
- func (c *Cache) AddPodNamespaces(items []*mysqlmodel.PodNamespace)
- func (c *Cache) AddPodNodes(items []*mysqlmodel.PodNode)
- func (c *Cache) AddPodReplicaSets(items []*mysqlmodel.PodReplicaSet)
- func (c *Cache) AddPodService(item *mysqlmodel.PodService)
- func (c *Cache) AddPodServicePorts(items []*mysqlmodel.PodServicePort)
- func (c *Cache) AddPodServices(items []*mysqlmodel.PodService)
- func (c *Cache) AddPods(items []*mysqlmodel.Pod)
- func (c *Cache) AddProcesses(items []*mysqlmodel.Process)
- func (c *Cache) AddRDSInstances(items []*mysqlmodel.RDSInstance)
- func (c *Cache) AddRedisInstances(items []*mysqlmodel.RedisInstance)
- func (c *Cache) AddRegion(item *mysqlmodel.Region)
- func (c *Cache) AddRegions(items []*mysqlmodel.Region)
- func (c *Cache) AddRoutingTables(items []*mysqlmodel.RoutingTable)
- func (c *Cache) AddSubDomain(item *mysqlmodel.SubDomain)
- func (c *Cache) AddSubDomains(items []*mysqlmodel.SubDomain)
- func (c *Cache) AddSubnets(items []*mysqlmodel.Subnet)
- func (c *Cache) AddVIPs(items []*mysqlmodel.VIP)
- func (c *Cache) AddVInterfaces(items []*mysqlmodel.VInterface)
- func (c *Cache) AddVM(item *mysqlmodel.VM)
- func (c *Cache) AddVMPodNodeConnections(items []*mysqlmodel.VMPodNodeConnection)
- func (c *Cache) AddVMs(items []*mysqlmodel.VM)
- func (c *Cache) AddVPCs(items []*mysqlmodel.VPC)
- func (c *Cache) AddVRouter(item *mysqlmodel.VRouter)
- func (c *Cache) AddVRouters(items []*mysqlmodel.VRouter)
- func (c *Cache) AddWANIPs(items []*mysqlmodel.WANIP)
- func (c *Cache) DeleteAZ(lcuuid string)
- func (c *Cache) DeleteAZs(lcuuids []string)
- func (c *Cache) DeleteCENs(lcuuids []string)
- func (c *Cache) DeleteDHCPPorts(lcuuids []string)
- func (c *Cache) DeleteFloatingIPs(lcuuids []string)
- func (c *Cache) DeleteHost(lcuuid string)
- func (c *Cache) DeleteHosts(lcuuids []string)
- func (c *Cache) DeleteLANIPs(lcuuids []string)
- func (c *Cache) DeleteLBListeners(lcuuids []string)
- func (c *Cache) DeleteLBTargetServers(lcuuids []string)
- func (c *Cache) DeleteLBVMConnections(lcuuids []string)
- func (c *Cache) DeleteLBs(lcuuids []string)
- func (c *Cache) DeleteNATGateways(lcuuids []string)
- func (c *Cache) DeleteNATRules(lcuuids []string)
- func (c *Cache) DeleteNATVMConnections(lcuuids []string)
- func (c *Cache) DeleteNetworks(lcuuids []string)
- func (c *Cache) DeletePeerConnections(lcuuids []string)
- func (c *Cache) DeletePodClusters(lcuuids []string)
- func (c *Cache) DeletePodGroupPorts(lcuuids []string)
- func (c *Cache) DeletePodGroups(lcuuids []string)
- func (c *Cache) DeletePodIngressRuleBackends(lcuuids []string)
- func (c *Cache) DeletePodIngressRules(lcuuids []string)
- func (c *Cache) DeletePodIngresses(lcuuids []string)
- func (c *Cache) DeletePodNamespaces(lcuuids []string)
- func (c *Cache) DeletePodNodes(lcuuids []string)
- func (c *Cache) DeletePodReplicaSets(lcuuids []string)
- func (c *Cache) DeletePodServicePorts(lcuuids []string)
- func (c *Cache) DeletePodServices(lcuuids []string)
- func (c *Cache) DeletePods(lcuuids []string)
- func (c *Cache) DeleteProcesses(lcuuids []string)
- func (c *Cache) DeleteRDSInstances(lcuuids []string)
- func (c *Cache) DeleteRedisInstances(lcuuids []string)
- func (c *Cache) DeleteRegion(lcuuid string)
- func (c *Cache) DeleteRegions(lcuuids []string)
- func (c *Cache) DeleteRoutingTables(lcuuids []string)
- func (c *Cache) DeleteSubDomain(lcuuid string)
- func (c *Cache) DeleteSubDomains(lcuuids []string)
- func (c *Cache) DeleteSubnets(lcuuids []string)
- func (c *Cache) DeleteVIPs(lcuuids []string)
- func (c *Cache) DeleteVInterfaces(lcuuids []string)
- func (c *Cache) DeleteVM(lcuuid string)
- func (c *Cache) DeleteVMPodNodeConnections(lcuuids []string)
- func (c *Cache) DeleteVMs(lcuuids []string)
- func (c *Cache) DeleteVPCs(lcuuids []string)
- func (c *Cache) DeleteVRouters(lcuuids []string)
- func (c *Cache) DeleteWANIPs(lcuuids []string)
- func (c *Cache) GetMetadata() *rcommon.Metadata
- func (c *Cache) GetSequence() int
- func (c *Cache) IncrementSequence()
- func (c *Cache) Refresh()
- func (c *Cache) ResetRefreshSignal(caller string)
- func (c *Cache) SetLogLevel(level logging.Level, caller string)
- func (c *Cache) SetSequence(sequence int)
- func (c *Cache) StartSelfHealing()
- func (c *Cache) TryRefresh() bool
- func (c *Cache) UpdateDHCPPort(cloudItem *cloudmodel.DHCPPort)
- func (c *Cache) UpdateHost(cloudItem *cloudmodel.Host)
- func (c *Cache) UpdateLB(cloudItem *cloudmodel.LB)
- func (c *Cache) UpdateNATGateway(cloudItem *cloudmodel.NATGateway)
- func (c *Cache) UpdateNetwork(cloudItem *cloudmodel.Network)
- func (c *Cache) UpdatePod(cloudItem *cloudmodel.Pod)
- func (c *Cache) UpdatePodNode(cloudItem *cloudmodel.PodNode)
- func (c *Cache) UpdatePodService(cloudItem *cloudmodel.PodService)
- func (c *Cache) UpdateRDSInstance(cloudItem *cloudmodel.RDSInstance)
- func (c *Cache) UpdateRedisInstance(cloudItem *cloudmodel.RedisInstance)
- func (c *Cache) UpdateVInterface(cloudItem *cloudmodel.VInterface)
- func (c *Cache) UpdateVM(cloudItem *cloudmodel.VM)
- func (c *Cache) UpdateVRouter(cloudItem *cloudmodel.VRouter)
- type CacheManager
- type LogController
Constants ¶
View Source
const ( RefreshSignalCallerSelfHeal = "self_heal" RefreshSignalCallerDomain = "domain" RefreshSignalCallerSubDomain = "sub_domain" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { SelfHealInterval time.Duration RefreshSignal chan struct{} // 用于限制并发刷新 Sequence int // 缓存的序列标识,根据刷新递增;为debug方便,设置为公有属性,需避免直接修改值,使用接口修改 DiffBaseDataSet *diffbase.DataSet ToolDataSet *tool.DataSet // contains filtered or unexported fields }
func (*Cache) AddAZ ¶
func (c *Cache) AddAZ(item *mysqlmodel.AZ)
func (*Cache) AddAZs ¶
func (c *Cache) AddAZs(items []*mysqlmodel.AZ)
func (*Cache) AddCENs ¶
func (c *Cache) AddCENs(items []*mysqlmodel.CEN)
func (*Cache) AddDHCPPorts ¶
func (c *Cache) AddDHCPPorts(items []*mysqlmodel.DHCPPort)
func (*Cache) AddFloatingIPs ¶
func (c *Cache) AddFloatingIPs(items []*mysqlmodel.FloatingIP)
func (*Cache) AddHost ¶
func (c *Cache) AddHost(item *mysqlmodel.Host)
func (*Cache) AddHosts ¶
func (c *Cache) AddHosts(items []*mysqlmodel.Host)
func (*Cache) AddLANIPs ¶
func (c *Cache) AddLANIPs(items []*mysqlmodel.LANIP)
func (*Cache) AddLBListeners ¶
func (c *Cache) AddLBListeners(items []*mysqlmodel.LBListener)
func (*Cache) AddLBTargetServers ¶
func (c *Cache) AddLBTargetServers(items []*mysqlmodel.LBTargetServer)
func (*Cache) AddLBVMConnections ¶
func (c *Cache) AddLBVMConnections(items []*mysqlmodel.LBVMConnection)
func (*Cache) AddLBs ¶
func (c *Cache) AddLBs(items []*mysqlmodel.LB)
func (*Cache) AddNATGateways ¶
func (c *Cache) AddNATGateways(items []*mysqlmodel.NATGateway)
func (*Cache) AddNATRules ¶
func (c *Cache) AddNATRules(items []*mysqlmodel.NATRule)
func (*Cache) AddNATVMConnections ¶
func (c *Cache) AddNATVMConnections(items []*mysqlmodel.NATVMConnection)
func (*Cache) AddNetwork ¶
func (c *Cache) AddNetwork(item *mysqlmodel.Network)
func (*Cache) AddNetworks ¶
func (c *Cache) AddNetworks(items []*mysqlmodel.Network)
func (*Cache) AddPeerConnections ¶
func (c *Cache) AddPeerConnections(items []*mysqlmodel.PeerConnection)
func (*Cache) AddPodClusters ¶
func (c *Cache) AddPodClusters(items []*mysqlmodel.PodCluster)
func (*Cache) AddPodGroupPorts ¶
func (c *Cache) AddPodGroupPorts(items []*mysqlmodel.PodGroupPort)
func (*Cache) AddPodGroups ¶
func (c *Cache) AddPodGroups(items []*mysqlmodel.PodGroup)
func (*Cache) AddPodIngress ¶
func (c *Cache) AddPodIngress(item *mysqlmodel.PodIngress)
func (*Cache) AddPodIngressRuleBackends ¶
func (c *Cache) AddPodIngressRuleBackends(items []*mysqlmodel.PodIngressRuleBackend)
func (*Cache) AddPodIngressRules ¶
func (c *Cache) AddPodIngressRules(items []*mysqlmodel.PodIngressRule)
func (*Cache) AddPodIngresses ¶
func (c *Cache) AddPodIngresses(items []*mysqlmodel.PodIngress)
func (*Cache) AddPodNamespaces ¶
func (c *Cache) AddPodNamespaces(items []*mysqlmodel.PodNamespace)
func (*Cache) AddPodNodes ¶
func (c *Cache) AddPodNodes(items []*mysqlmodel.PodNode)
func (*Cache) AddPodReplicaSets ¶
func (c *Cache) AddPodReplicaSets(items []*mysqlmodel.PodReplicaSet)
func (*Cache) AddPodService ¶
func (c *Cache) AddPodService(item *mysqlmodel.PodService)
func (*Cache) AddPodServicePorts ¶
func (c *Cache) AddPodServicePorts(items []*mysqlmodel.PodServicePort)
func (*Cache) AddPodServices ¶
func (c *Cache) AddPodServices(items []*mysqlmodel.PodService)
func (*Cache) AddPods ¶
func (c *Cache) AddPods(items []*mysqlmodel.Pod)
func (*Cache) AddProcesses ¶
func (c *Cache) AddProcesses(items []*mysqlmodel.Process)
func (*Cache) AddRDSInstances ¶
func (c *Cache) AddRDSInstances(items []*mysqlmodel.RDSInstance)
func (*Cache) AddRedisInstances ¶
func (c *Cache) AddRedisInstances(items []*mysqlmodel.RedisInstance)
func (*Cache) AddRegion ¶
func (c *Cache) AddRegion(item *mysqlmodel.Region)
func (*Cache) AddRegions ¶
func (c *Cache) AddRegions(items []*mysqlmodel.Region)
func (*Cache) AddRoutingTables ¶
func (c *Cache) AddRoutingTables(items []*mysqlmodel.RoutingTable)
func (*Cache) AddSubDomain ¶
func (c *Cache) AddSubDomain(item *mysqlmodel.SubDomain)
func (*Cache) AddSubDomains ¶
func (c *Cache) AddSubDomains(items []*mysqlmodel.SubDomain)
func (*Cache) AddSubnets ¶
func (c *Cache) AddSubnets(items []*mysqlmodel.Subnet)
func (*Cache) AddVIPs ¶
func (c *Cache) AddVIPs(items []*mysqlmodel.VIP)
func (*Cache) AddVInterfaces ¶
func (c *Cache) AddVInterfaces(items []*mysqlmodel.VInterface)
func (*Cache) AddVM ¶
func (c *Cache) AddVM(item *mysqlmodel.VM)
func (*Cache) AddVMPodNodeConnections ¶
func (c *Cache) AddVMPodNodeConnections(items []*mysqlmodel.VMPodNodeConnection)
func (*Cache) AddVMs ¶
func (c *Cache) AddVMs(items []*mysqlmodel.VM)
func (*Cache) AddVPCs ¶
func (c *Cache) AddVPCs(items []*mysqlmodel.VPC)
func (*Cache) AddVRouter ¶
func (c *Cache) AddVRouter(item *mysqlmodel.VRouter)
func (*Cache) AddVRouters ¶
func (c *Cache) AddVRouters(items []*mysqlmodel.VRouter)
func (*Cache) AddWANIPs ¶
func (c *Cache) AddWANIPs(items []*mysqlmodel.WANIP)
func (*Cache) DeleteCENs ¶
func (*Cache) DeleteDHCPPorts ¶
func (*Cache) DeleteFloatingIPs ¶
func (*Cache) DeleteHost ¶
func (*Cache) DeleteHosts ¶
func (*Cache) DeleteLANIPs ¶
func (*Cache) DeleteLBListeners ¶
func (*Cache) DeleteLBTargetServers ¶
func (*Cache) DeleteLBVMConnections ¶
func (*Cache) DeleteNATGateways ¶
func (*Cache) DeleteNATRules ¶
func (*Cache) DeleteNATVMConnections ¶
func (*Cache) DeleteNetworks ¶
func (*Cache) DeletePeerConnections ¶
func (*Cache) DeletePodClusters ¶
func (*Cache) DeletePodGroupPorts ¶
func (*Cache) DeletePodGroups ¶
func (*Cache) DeletePodIngressRuleBackends ¶
func (*Cache) DeletePodIngressRules ¶
func (*Cache) DeletePodIngresses ¶
func (*Cache) DeletePodNamespaces ¶
func (*Cache) DeletePodNodes ¶
func (*Cache) DeletePodReplicaSets ¶
func (*Cache) DeletePodServicePorts ¶
func (*Cache) DeletePodServices ¶
func (*Cache) DeletePods ¶
func (*Cache) DeleteProcesses ¶
func (*Cache) DeleteRDSInstances ¶
func (*Cache) DeleteRedisInstances ¶
func (*Cache) DeleteRegion ¶
func (*Cache) DeleteRegions ¶
func (*Cache) DeleteRoutingTables ¶
func (*Cache) DeleteSubDomain ¶
func (*Cache) DeleteSubDomains ¶
func (*Cache) DeleteSubnets ¶
func (*Cache) DeleteVIPs ¶
func (*Cache) DeleteVInterfaces ¶
func (*Cache) DeleteVMPodNodeConnections ¶
func (*Cache) DeleteVPCs ¶
func (*Cache) DeleteVRouters ¶
func (*Cache) DeleteWANIPs ¶
func (*Cache) GetMetadata ¶
func (*Cache) GetSequence ¶
func (*Cache) IncrementSequence ¶
func (c *Cache) IncrementSequence()
func (*Cache) ResetRefreshSignal ¶
func (*Cache) SetLogLevel ¶
func (*Cache) SetSequence ¶
func (*Cache) StartSelfHealing ¶
func (c *Cache) StartSelfHealing()
func (*Cache) TryRefresh ¶
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 // contains filtered or unexported fields }
为支持domain及其sub_domain的独立刷新,将缓存拆分成对应的独立Cache
func NewCacheManager ¶
func NewCacheManager(ctx context.Context, cfg config.RecorderConfig, md *rcommon.Metadata) *CacheManager
func (*CacheManager) CreateSubDomainCacheIfNotExists ¶
func (m *CacheManager) CreateSubDomainCacheIfNotExists(md *rcommon.Metadata) *Cache
type LogController ¶
type LogController struct {
// contains filtered or unexported fields
}
func (*LogController) GetLogFunc ¶
func (l *LogController) GetLogFunc() func(args ...interface{})
func (*LogController) SetLogLevel ¶
func (l *LogController) SetLogLevel(level logging.Level) error
Click to show internal directories.
Click to hide internal directories.