cache

package
v0.0.0-...-b8a1a0e Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

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) AddPrometheusTargets

func (c *Cache) AddPrometheusTargets(items []*mysql.PrometheusTarget)

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) AddVIPs

func (c *Cache) AddVIPs(items []*mysql.VIP)

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) DeletePrometheusTargets

func (c *Cache) DeletePrometheusTargets(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) DeleteVIPs

func (c *Cache) DeleteVIPs(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) SetLogLevel

func (c *Cache) SetLogLevel(level logging.Level)

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) SetLogLevel

func (m *CacheManager) SetLogLevel(logLevel logging.Level)

func (*CacheManager) UpdateSequence

func (m *CacheManager) UpdateSequence()

sequence随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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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