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.

deleteclusterlogic.go 838 B

123456789101112131415161718192021222324252627282930313233
  1. package cloud
  2. import (
  3. "context"
  4. "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc"
  5. "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/types"
  6. "gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/models"
  7. "github.com/zeromicro/go-zero/core/logx"
  8. )
  9. type DeleteClusterLogic struct {
  10. logx.Logger
  11. ctx context.Context
  12. svcCtx *svc.ServiceContext
  13. }
  14. func NewDeleteClusterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteClusterLogic {
  15. return &DeleteClusterLogic{
  16. Logger: logx.WithContext(ctx),
  17. ctx: ctx,
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (l *DeleteClusterLogic) DeleteCluster(req *types.DeleteClusterReq) (resp *types.CloudResp, err error) {
  22. // 删除集群信息
  23. tx := l.svcCtx.DbEngin.Where("name = ?", req.Name).Delete(&models.ScParticipantPhyInfo{})
  24. if tx.Error != nil {
  25. return nil, tx.Error
  26. }
  27. return
  28. }

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.