You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ScheduleVm.go 991 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package mqs
  2. import (
  3. "context"
  4. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
  5. )
  6. /*
  7. *
  8. */
  9. type VmMq struct {
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. }
  13. func NewVmMq(ctx context.Context, svcCtx *svc.ServiceContext) *VmMq {
  14. return &VmMq{
  15. ctx: ctx,
  16. svcCtx: svcCtx,
  17. }
  18. }
  19. func (l *VmMq) Consume(val string) error {
  20. // 接受消息, 根据标签筛选过滤
  21. //vmScheduler := schedulers.NewVmScheduler()
  22. //schdl, err := scheduler.NewScheduler(vmScheduler, val, l.svcCtx.DbEngin, l.svcCtx.ParticipantRpc)
  23. //if err != nil {
  24. // return err
  25. //}
  26. //
  27. ////检测是否指定了集群列表
  28. //schdl.SpecifyClusters()
  29. //
  30. ////检测是否指定了nsID
  31. //schdl.SpecifyNsID()
  32. //
  33. ////通过标签匹配筛选出集群范围
  34. //schdl.MatchLabels()
  35. //
  36. ////todo 屏蔽原调度算法,因为监控数据暂未上报,临时采用随机调度
  37. //schdl.TempAssign()
  38. //
  39. //// 存储数据
  40. //err = schdl.SaveToDb()
  41. //if err != nil {
  42. // return err
  43. //}
  44. return nil
  45. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.