updater

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: 18 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 {
	UpdaterBase[cloudmodel.AZ, mysql.AZ, *diffbase.AZ]
}

func NewAZ

func NewAZ(wholeCache *cache.Cache, cloudData []cloudmodel.AZ) *AZ

type CEN

type CEN struct {
	UpdaterBase[cloudmodel.CEN, mysql.CEN, *diffbase.CEN]
}

func NewCEN

func NewCEN(wholeCache *cache.Cache, cloudData []cloudmodel.CEN) *CEN

type 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

func NewFloatingIP

func NewFloatingIP(wholeCache *cache.Cache, cloudData []cloudmodel.FloatingIP) *FloatingIP

type Host

type Host struct {
	UpdaterBase[cloudmodel.Host, mysql.Host, *diffbase.Host]
}

func NewHost

func NewHost(wholeCache *cache.Cache, cloudData []cloudmodel.Host) *Host

type IP

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

func NewIP

func NewIP(cache *cache.Cache, cloudData []cloudmodel.IP, domainToolDataSet *tool.DataSet) *IP

func (*IP) GetChanged

func (i *IP) GetChanged() bool

func (*IP) GetLANIP

func (i *IP) GetLANIP() *LANIP

func (*IP) GetMySQLModelString

func (i *IP) GetMySQLModelString() []string

func (*IP) GetWANIP

func (i *IP) GetWANIP() *WANIP

func (*IP) HandleAddAndUpdate

func (i *IP) HandleAddAndUpdate()

func (*IP) HandleDelete

func (i *IP) HandleDelete()

type LANIP

type LANIP struct {
	UpdaterBase[cloudmodel.IP, mysql.LANIP, *diffbase.LANIP]
}

func NewLANIP

func NewLANIP(wholeCache *cache.Cache, domainToolDataSet *tool.DataSet) *LANIP

func (*LANIP) SetCloudData

func (i *LANIP) SetCloudData(cloudData []cloudmodel.IP)

type LB

type LB struct {
	UpdaterBase[cloudmodel.LB, mysql.LB, *diffbase.LB]
}

func NewLB

func NewLB(wholeCache *cache.Cache, cloudData []cloudmodel.LB) *LB

type LBListener

func NewLBListener

func NewLBListener(wholeCache *cache.Cache, cloudData []cloudmodel.LBListener) *LBListener

type LBTargetServer

func NewLBTargetServer

func NewLBTargetServer(wholeCache *cache.Cache, cloudData []cloudmodel.LBTargetServer) *LBTargetServer

type LBVMConnection

func NewLBVMConnection

func NewLBVMConnection(wholeCache *cache.Cache, cloudData []cloudmodel.LBVMConnection) *LBVMConnection

type NATGateway

func NewNATGateway

func NewNATGateway(wholeCache *cache.Cache, cloudData []cloudmodel.NATGateway) *NATGateway

type NATRule

func NewNATRule

func NewNATRule(wholeCache *cache.Cache, cloudData []cloudmodel.NATRule) *NATRule

type NATVMConnection

func NewNATVMConnection

func NewNATVMConnection(wholeCache *cache.Cache, cloudData []cloudmodel.NATVMConnection) *NATVMConnection

type Network

func NewNetwork

func NewNetwork(wholeCache *cache.Cache, cloudData []cloudmodel.Network) *Network

type PeerConnection

func NewPeerConnection

func NewPeerConnection(wholeCache *cache.Cache, cloudData []cloudmodel.PeerConnection) *PeerConnection

type Pod

type Pod struct {
	UpdaterBase[cloudmodel.Pod, mysql.Pod, *diffbase.Pod]
}

func NewPod

func NewPod(wholeCache *cache.Cache, cloudData []cloudmodel.Pod) *Pod

type PodCluster

func NewPodCluster

func NewPodCluster(wholeCache *cache.Cache, cloudData []cloudmodel.PodCluster) *PodCluster

type PodGroup

func NewPodGroup

func NewPodGroup(wholeCache *cache.Cache, cloudData []cloudmodel.PodGroup) *PodGroup

type PodGroupPort

func NewPodGroupPort

func NewPodGroupPort(wholeCache *cache.Cache, cloudData []cloudmodel.PodGroupPort) *PodGroupPort

type PodIngress

func NewPodIngress

func NewPodIngress(wholeCache *cache.Cache, cloudData []cloudmodel.PodIngress) *PodIngress

type PodIngressRule

func NewPodIngressRule

func NewPodIngressRule(wholeCache *cache.Cache, cloudData []cloudmodel.PodIngressRule) *PodIngressRule

type PodNamespace

func NewPodNamespace

func NewPodNamespace(wholeCache *cache.Cache, cloudData []cloudmodel.PodNamespace) *PodNamespace

type PodNode

func NewPodNode

func NewPodNode(wholeCache *cache.Cache, cloudData []cloudmodel.PodNode) *PodNode

type PodReplicaSet

func NewPodReplicaSet

func NewPodReplicaSet(wholeCache *cache.Cache, cloudData []cloudmodel.PodReplicaSet) *PodReplicaSet

type PodService

func NewPodService

func NewPodService(wholeCache *cache.Cache, cloudData []cloudmodel.PodService) *PodService

type PodServicePort

func NewPodServicePort

func NewPodServicePort(wholeCache *cache.Cache, cloudData []cloudmodel.PodServicePort) *PodServicePort

type Process

func NewProcess

func NewProcess(wholeCache *cache.Cache, cloudData []cloudmodel.Process) *Process

type PrometheusTarget

func NewPrometheusTarget

func NewPrometheusTarget(wholeCache *cache.Cache, cloudData []cloudmodel.PrometheusTarget) *PrometheusTarget

type RDSInstance

func NewRDSInstance

func NewRDSInstance(wholeCache *cache.Cache, cloudData []cloudmodel.RDSInstance) *RDSInstance

type RedisInstance

func NewRedisInstance

func NewRedisInstance(wholeCache *cache.Cache, cloudData []cloudmodel.RedisInstance) *RedisInstance

type Region

type Region struct {
	UpdaterBase[cloudmodel.Region, mysql.Region, *diffbase.Region]
}

func NewRegion

func NewRegion(wholeCache *cache.Cache, cloudData []cloudmodel.Region) *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()
	GetChanged() bool
	GetMySQLModelString() []string
}

ResourceUpdater 实现资源进行新旧数据比对,并根据比对结果增删改资源

type RoutingTable

func NewRoutingTable

func NewRoutingTable(wholeCache *cache.Cache, cloudData []cloudmodel.RoutingTable) *RoutingTable

type SecurityGroup

func NewSecurityGroup

func NewSecurityGroup(wholeCache *cache.Cache, cloudData []cloudmodel.SecurityGroup) *SecurityGroup

type SubDomain

func NewSubDomain

func NewSubDomain(wholeCache *cache.Cache, cloudData []cloudmodel.SubDomain) *SubDomain

type Subnet

type Subnet struct {
	UpdaterBase[cloudmodel.Subnet, mysql.Subnet, *diffbase.Subnet]
}

func NewSubnet

func NewSubnet(wholeCache *cache.Cache, cloudData []cloudmodel.Subnet) *Subnet

type UpdaterBase

type UpdaterBase[CT constraint.CloudModel, MT constraint.MySQLModel, BT constraint.DiffBase[MT]] struct {

	// Set Changed to true if the resource database and cache are updated,
	// used for cache update notifications to trisolaris module.
	Changed bool
	// contains filtered or unexported fields
}

func (*UpdaterBase[CT, MT, BT]) GetChanged

func (u *UpdaterBase[CT, MT, BT]) GetChanged() bool

func (*UpdaterBase[CT, MT, BT]) GetMySQLModelString

func (u *UpdaterBase[CT, MT, BT]) GetMySQLModelString() []string

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]) RegisterListener

func (u *UpdaterBase[CT, MT, BT]) RegisterListener(listener listener.Listener[CT, MT, BT]) ResourceUpdater

type VIP

type VIP struct {
	UpdaterBase[cloudmodel.VIP, mysql.VIP, *diffbase.VIP]
}

func NewVIP

func NewVIP(wholeCache *cache.Cache, cloudData []cloudmodel.VIP) *VIP

type VInterface

func NewVInterface

func NewVInterface(wholeCache *cache.Cache, cloudData []cloudmodel.VInterface, domainToolDataSet *tool.DataSet) *VInterface

type VM

type VM struct {
	UpdaterBase[cloudmodel.VM, mysql.VM, *diffbase.VM]
}

func NewVM

func NewVM(wholeCache *cache.Cache, cloudData []cloudmodel.VM) *VM

type VMSecurityGroup

func NewVMSecurityGroup

func NewVMSecurityGroup(wholeCache *cache.Cache, cloudData []cloudmodel.VMSecurityGroup) *VMSecurityGroup

type VPC

type VPC struct {
	UpdaterBase[cloudmodel.VPC, mysql.VPC, *diffbase.VPC]
}

func NewVPC

func NewVPC(wholeCache *cache.Cache, cloudData []cloudmodel.VPC) *VPC

type VRouter

func NewVRouter

func NewVRouter(wholeCache *cache.Cache, cloudData []cloudmodel.VRouter) *VRouter

type WANIP

type WANIP struct {
	UpdaterBase[cloudmodel.IP, mysql.WANIP, *diffbase.WANIP]
}

func NewWANIP

func NewWANIP(wholeCache *cache.Cache, domainToolDataSet *tool.DataSet) *WANIP

func (*WANIP) SetCloudData

func (i *WANIP) SetCloudData(cloudData []cloudmodel.IP)

Jump to

Keyboard shortcuts

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