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.

schedulegetdatasetslogic.go 997 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package schedule
  2. import (
  3. "context"
  4. "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/scheduler/service"
  5. "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/storeLink"
  6. "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
  7. "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
  8. "github.com/zeromicro/go-zero/core/logx"
  9. )
  10. type ScheduleGetDatasetsLogic struct {
  11. logx.Logger
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. }
  15. func NewScheduleGetDatasetsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ScheduleGetDatasetsLogic {
  16. return &ScheduleGetDatasetsLogic{
  17. Logger: logx.WithContext(ctx),
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. }
  21. }
  22. func (l *ScheduleGetDatasetsLogic) ScheduleGetDatasets() (resp *types.AiDatasetsResp, err error) {
  23. resp = &types.AiDatasetsResp{}
  24. _, colMap := service.InitAiClusterMap(l.ctx, l.svcCtx)
  25. names, err := storeLink.GetDatasetsNames(colMap)
  26. if err != nil {
  27. return nil, err
  28. }
  29. resp.Datasets = names
  30. return resp, nil
  31. }

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.