event

package
v1.6.65 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DESCMigrateFormat     = "%s migrate from %s to %s."
	DESCStateChangeFormat = "%s state changes from %s to %s."
	DESCRecreateFormat    = "%s recreate from %s to %s."
	DESCAddIPFormat       = "%s add ip %s(mac: %s) in subnet %s."
	DESCRemoveIPFormat    = "%s remove ip %s(mac: %s) in subnet %s."
)
View Source
var (
	VMStateToString = map[int]string{
		ctrlrcommon.VM_STATE_RUNNING:   "running",
		ctrlrcommon.VM_STATE_STOPPED:   "stopped",
		ctrlrcommon.VM_STATE_EXCEPTION: "exception",
	}
)

Functions

func NewEventQueue

func NewEventQueue() *queue.OverwriteQueue

func RandID

func RandID() int

func RandLcuuid

func RandLcuuid() string

func RandName

func RandName() string

Types

type DHCPPort

type DHCPPort struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewDHCPPort

func NewDHCPPort(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *DHCPPort

func (*DHCPPort) ProduceByAdd

func (p *DHCPPort) ProduceByAdd(items []*mysqlmodel.DHCPPort)

func (*DHCPPort) ProduceByDelete

func (p *DHCPPort) ProduceByDelete(lcuuids []string)

func (*DHCPPort) ProduceByUpdate

func (p *DHCPPort) ProduceByUpdate(cloudItem *cloudmodel.DHCPPort, diffBase *diffbase.DHCPPort)

type Domain

type Domain struct {
	SubDomain
}

func NewDomain

func NewDomain(domainLcuuid string, toolDS *tool.DataSet, eq *queue.OverwriteQueue) *Domain

type EventManagerBase

type EventManagerBase struct {
	ToolDataSet *tool.DataSet
	Queue       *queue.OverwriteQueue
	// contains filtered or unexported fields
}

type Host

type Host struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewHost

func NewHost(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *Host

func (*Host) ProduceByAdd

func (h *Host) ProduceByAdd(items []*mysqlmodel.Host)

func (*Host) ProduceByDelete

func (h *Host) ProduceByDelete(lcuuids []string)

func (*Host) ProduceByUpdate

func (h *Host) ProduceByUpdate(cloudItem *cloudmodel.Host, diffBase *diffbase.Host)

type IPTool

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

func (*IPTool) GetDeviceOptionsByDeviceID

func (i *IPTool) GetDeviceOptionsByDeviceID(deviceType, deviceID int) ([]eventapi.TagFieldOption, error)

type LANIP

type LANIP struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewLANIP

func NewLANIP(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *LANIP

func (*LANIP) ProduceByAdd

func (i *LANIP) ProduceByAdd(items []*mysqlmodel.LANIP)

func (*LANIP) ProduceByDelete

func (i *LANIP) ProduceByDelete(lcuuids []string)

func (*LANIP) ProduceByUpdate

func (i *LANIP) ProduceByUpdate(items *cloudmodel.IP, diffBase *diffbase.LANIP)

type LB

type LB struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewLB

func NewLB(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *LB

func (*LB) ProduceByAdd

func (l *LB) ProduceByAdd(items []*mysqlmodel.LB)

func (*LB) ProduceByDelete

func (l *LB) ProduceByDelete(lcuuids []string)

func (*LB) ProduceByUpdate

func (l *LB) ProduceByUpdate(cloudItem *cloudmodel.LB, diffBase *diffbase.LB)

type NATGateway

type NATGateway struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewNATGateway

func NewNATGateway(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *NATGateway

func (*NATGateway) ProduceByAdd

func (n *NATGateway) ProduceByAdd(items []*mysqlmodel.NATGateway)

func (*NATGateway) ProduceByDelete

func (n *NATGateway) ProduceByDelete(lcuuids []string)

func (*NATGateway) ProduceByUpdate

func (n *NATGateway) ProduceByUpdate(cloudItem *cloudmodel.NATGateway, diffBase *diffbase.NATGateway)

type Pod

type Pod struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewPod

func NewPod(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *Pod

func (*Pod) ProduceByAdd

func (p *Pod) ProduceByAdd(items []*mysqlmodel.Pod)

func (*Pod) ProduceByDelete

func (p *Pod) ProduceByDelete(lcuuids []string)

func (*Pod) ProduceByUpdate

func (p *Pod) ProduceByUpdate(cloudItem *cloudmodel.Pod, diffBase *diffbase.Pod)

type PodNode

type PodNode struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewPodNode

func NewPodNode(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *PodNode

func (*PodNode) ProduceByAdd

func (p *PodNode) ProduceByAdd(items []*mysqlmodel.PodNode)

func (*PodNode) ProduceByDelete

func (p *PodNode) ProduceByDelete(lcuuids []string)

func (*PodNode) ProduceByUpdate

func (p *PodNode) ProduceByUpdate(cloudItem *cloudmodel.PodNode, diffBase *diffbase.PodNode)

type PodService

type PodService struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewPodService

func NewPodService(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *PodService

func (*PodService) ProduceByAdd

func (p *PodService) ProduceByAdd(items []*mysqlmodel.PodService)

func (*PodService) ProduceByDelete

func (p *PodService) ProduceByDelete(lcuuids []string)

func (*PodService) ProduceByUpdate

func (p *PodService) ProduceByUpdate(cloudItem *cloudmodel.PodService, diffBase *diffbase.PodService)

type Process

type Process struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewProcess

func NewProcess(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *Process

func (*Process) GetProcessData

func (p *Process) GetProcessData(processes []*mysqlmodel.Process) (map[int]ProcessData, error)

func (*Process) ProduceByAdd

func (p *Process) ProduceByAdd(items []*mysqlmodel.Process)

func (*Process) ProduceByDelete

func (p *Process) ProduceByDelete(lcuuids []string)

func (*Process) ProduceByUpdate

func (p *Process) ProduceByUpdate(cloudItem *cloudmodel.Process, diffBase *diffbase.Process)

type ProcessData

type ProcessData struct {
	ResourceType int
	ResourceName string
	ResourceID   int
	VTapName     string
}

type RDSInstance

type RDSInstance struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewRDSInstance

func NewRDSInstance(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *RDSInstance

func (*RDSInstance) ProduceByAdd

func (r *RDSInstance) ProduceByAdd(items []*mysqlmodel.RDSInstance)

func (*RDSInstance) ProduceByDelete

func (r *RDSInstance) ProduceByDelete(lcuuids []string)

type RedisInstance

type RedisInstance struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewRedisInstance

func NewRedisInstance(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *RedisInstance

func (*RedisInstance) ProduceByAdd

func (r *RedisInstance) ProduceByAdd(items []*mysqlmodel.RedisInstance)

func (*RedisInstance) ProduceByDelete

func (r *RedisInstance) ProduceByDelete(lcuuids []string)

func (*RedisInstance) ProduceByUpdate

func (r *RedisInstance) ProduceByUpdate(cloudItem *cloudmodel.RedisInstance, diffBase *diffbase.RedisInstance)

type ResourceEventToMySQL

type ResourceEventToMySQL struct {
	eventapi.ResourceEvent
}

type SubDomain

type SubDomain struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewSubDomain

func NewSubDomain(domainLcuuid, subDomainLcuuid string, toolDS *tool.DataSet, eq *queue.OverwriteQueue) *SubDomain

func (*SubDomain) ProduceFromMySQL

func (r *SubDomain) ProduceFromMySQL()

After all updaters are processed, fill the information of resource events stored in the db and put them to the queue. If the population fails, incomplete resource events are also written to the queue.

type VM

type VM struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewVM

func NewVM(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *VM

func (*VM) ProduceByAdd

func (v *VM) ProduceByAdd(items []*mysqlmodel.VM)

func (*VM) ProduceByDelete

func (v *VM) ProduceByDelete(lcuuids []string)

func (*VM) ProduceByUpdate

func (v *VM) ProduceByUpdate(cloudItem *cloudmodel.VM, diffBase *diffbase.VM)

type VRouter

type VRouter struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewVRouter

func NewVRouter(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *VRouter

func (*VRouter) ProduceByAdd

func (r *VRouter) ProduceByAdd(items []*mysqlmodel.VRouter)

func (*VRouter) ProduceByDelete

func (r *VRouter) ProduceByDelete(lcuuids []string)

func (*VRouter) ProduceByUpdate

func (r *VRouter) ProduceByUpdate(cloudItem *cloudmodel.VRouter, diffBase *diffbase.VRouter)

type WANIP

type WANIP struct {
	EventManagerBase
	// contains filtered or unexported fields
}

func NewWANIP

func NewWANIP(toolDS *tool.DataSet, eq *queue.OverwriteQueue) *WANIP

func (*WANIP) ProduceByAdd

func (i *WANIP) ProduceByAdd(items []*mysqlmodel.WANIP)

func (*WANIP) ProduceByDelete

func (i *WANIP) ProduceByDelete(lcuuids []string)

func (*WANIP) ProduceByUpdate

func (i *WANIP) ProduceByUpdate(cloudItem *cloudmodel.IP, diffBase *diffbase.WANIP)

Jump to

Keyboard shortcuts

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