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.

adapterinfologic.go 872 B

12345678910111213141516171819202122232425262728293031
  1. package monitoring
  2. import (
  3. "context"
  4. "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc"
  5. "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types"
  6. "github.com/zeromicro/go-zero/core/logx"
  7. )
  8. type AdapterInfoLogic struct {
  9. logx.Logger
  10. ctx context.Context
  11. svcCtx *svc.ServiceContext
  12. }
  13. func NewAdapterInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AdapterInfoLogic {
  14. return &AdapterInfoLogic{
  15. Logger: logx.WithContext(ctx),
  16. ctx: ctx,
  17. svcCtx: svcCtx,
  18. }
  19. }
  20. func (l *AdapterInfoLogic) AdapterInfo(req *types.AdapterInfoReq) (resp *types.AdapterInfoResp, err error) {
  21. // todo: add your logic here and delete this line
  22. resp = &types.AdapterInfoResp{}
  23. l.svcCtx.DbEngin.Raw("select ta.name , ta.version from t_adapter ta,t_cluster tc where tc.id = ? and tc.adapter_id = ta.id", req.ClusterId).Scan(resp)
  24. return resp, nil
  25. }

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.