JCC-CSScheduler/common/pkgs/mq/collector/pcm.go

37 lines
929 B
Go

package collector
import (
"gitlink.org.cn/cloudream/common/pkgs/mq"
pcmsdk "gitlink.org.cn/cloudream/common/sdks/pcm"
)
type PCMService interface {
GetImageList(msg *GetImageList) (*GetImageListResp, *mq.CodeMessage)
}
// 查询镜像列表
var _ = Register(Service.GetImageList)
type GetImageList struct {
mq.MessageBodyBase
PCMParticipantID pcmsdk.ParticipantID `json:"pcmParticipantID"`
}
type GetImageListResp struct {
mq.MessageBodyBase
Images []pcmsdk.Image `json:"images"`
}
func NewGetImageList(pcmParticipantID pcmsdk.ParticipantID) *GetImageList {
return &GetImageList{
PCMParticipantID: pcmParticipantID,
}
}
func NewGetImageListResp(images []pcmsdk.Image) *GetImageListResp {
return &GetImageListResp{
Images: images,
}
}
func (c *Client) GetImageList(msg *GetImageList, opts ...mq.RequestOption) (*GetImageListResp, error) {
return mq.Request(Service.GetImageList, c.rabbitCli, msg, opts...)
}