Documentation ¶
Index ¶
- Variables
- func NewEventQueue() *queue.OverwriteQueue
- func RandID() int
- func RandLcuuid() string
- func RandName() string
- type DHCPPort
- type Domain
- type EventManagerBase
- type Host
- type IPTool
- type LANIP
- type LB
- type NATGateway
- type Pod
- type PodNode
- type PodService
- type Process
- type ProcessData
- type RDSInstance
- type RedisInstance
- type ResourceEventToMySQL
- type SubDomain
- type VM
- type VRouter
- type WANIP
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 RandLcuuid ¶
func RandLcuuid() 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 (*DHCPPort) ProduceByUpdate ¶
func (p *DHCPPort) ProduceByUpdate(cloudItem *cloudmodel.DHCPPort, diffBase *diffbase.DHCPPort)
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 (*Host) ProduceByAdd ¶
func (h *Host) ProduceByAdd(items []*mysqlmodel.Host)
func (*Host) ProduceByDelete ¶
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 (*LANIP) ProduceByAdd ¶
func (i *LANIP) ProduceByAdd(items []*mysqlmodel.LANIP)
func (*LANIP) ProduceByDelete ¶
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 (*LB) ProduceByAdd ¶
func (l *LB) ProduceByAdd(items []*mysqlmodel.LB)
func (*LB) ProduceByDelete ¶
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 (*Pod) ProduceByAdd ¶
func (p *Pod) ProduceByAdd(items []*mysqlmodel.Pod)
func (*Pod) ProduceByDelete ¶
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 (*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 (*Process) ProduceByUpdate ¶
func (p *Process) ProduceByUpdate(cloudItem *cloudmodel.Process, diffBase *diffbase.Process)
type ProcessData ¶
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 (*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 (*VM) ProduceByAdd ¶
func (v *VM) ProduceByAdd(items []*mysqlmodel.VM)
func (*VM) ProduceByDelete ¶
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 (*VRouter) ProduceByUpdate ¶
func (r *VRouter) ProduceByUpdate(cloudItem *cloudmodel.VRouter, diffBase *diffbase.VRouter)
type WANIP ¶
type WANIP struct { EventManagerBase // contains filtered or unexported fields }
func (*WANIP) ProduceByAdd ¶
func (i *WANIP) ProduceByAdd(items []*mysqlmodel.WANIP)
func (*WANIP) ProduceByDelete ¶
func (*WANIP) ProduceByUpdate ¶
func (i *WANIP) ProduceByUpdate(cloudItem *cloudmodel.IP, diffBase *diffbase.WANIP)
Click to show internal directories.
Click to hide internal directories.