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.

getclusterbyidhandler.go 741 B

12345678910111213141516171819202122232425262728
  1. package core
  2. import (
  3. "net/http"
  4. "github.com/zeromicro/go-zero/rest/httpx"
  5. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/core"
  6. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc"
  7. "gitlink.org.cn/JointCloud/pcm-coordinator/internal/types"
  8. )
  9. func GetClusterByIdHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
  10. return func(w http.ResponseWriter, r *http.Request) {
  11. var req types.GetClusterByIdReq
  12. if err := httpx.Parse(r, &req); err != nil {
  13. httpx.ErrorCtx(r.Context(), w, err)
  14. return
  15. }
  16. l := core.NewGetClusterByIdLogic(r.Context(), svcCtx)
  17. resp, err := l.GetClusterById(&req)
  18. if err != nil {
  19. httpx.ErrorCtx(r.Context(), w, err)
  20. } else {
  21. httpx.OkJsonCtx(r.Context(), w, resp)
  22. }
  23. }
  24. }

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.