JCC-CSScheduler/common/pkgs/mq/manager/computing_center.go

34 lines
1011 B
Go

package manager
import (
"gitlink.org.cn/cloudream/common/pkgs/mq"
schmod "gitlink.org.cn/cloudream/scheduler/common/models"
)
type ComputingCenterService interface {
GetAllComputingCenter(msg *GetAllComputingCenter) (*GetAllComputingCenterResp, *mq.CodeMessage)
}
// 获取所有的算力中心信息
var _ = Register(Service.GetAllComputingCenter)
type GetAllComputingCenter struct {
mq.MessageBodyBase
}
type GetAllComputingCenterResp struct {
mq.MessageBodyBase
ComputingCenters []schmod.ComputingCenter `json:"computingCenters"`
}
func NewGetAllComputingCenter() *GetAllComputingCenter {
return &GetAllComputingCenter{}
}
func NewGetAllComputingCenterResp(ccs []schmod.ComputingCenter) *GetAllComputingCenterResp {
return &GetAllComputingCenterResp{
ComputingCenters: ccs,
}
}
func (c *Client) GetAllComputingCenter(msg *GetAllComputingCenter, opts ...mq.RequestOption) (*GetAllComputingCenterResp, error) {
return mq.Request(Service.GetAllComputingCenter, c.roundTripper, msg, opts...)
}