diff --git a/adaptor/PCM-CORE/api/internal/config/config.go b/adaptor/PCM-CORE/api/internal/config/config.go index ddb03ab6..5a09f30d 100644 --- a/adaptor/PCM-CORE/api/internal/config/config.go +++ b/adaptor/PCM-CORE/api/internal/config/config.go @@ -30,5 +30,6 @@ type Config struct { ACRpcConf zrpc.RpcClientConf THRpcConf zrpc.RpcClientConf ModelArtsRpcConf zrpc.RpcClientConf + CephRpcConf zrpc.RpcClientConf //OctopusRpcConf zrpc.RpcClientConf } diff --git a/adaptor/PCM-CORE/api/internal/svc/servicecontext.go b/adaptor/PCM-CORE/api/internal/svc/servicecontext.go index 4ed49ab0..81b795e7 100644 --- a/adaptor/PCM-CORE/api/internal/svc/servicecontext.go +++ b/adaptor/PCM-CORE/api/internal/svc/servicecontext.go @@ -49,6 +49,7 @@ func NewServiceContext(c config.Config) *ServiceContext { ScheduleCloudClient: kq.NewPusher(c.KqProducerConf.Brokers, c.KqProducerConf.CloudTopic), ScheduleAiClient: kq.NewPusher(c.KqProducerConf.Brokers, c.KqProducerConf.AiTopic), ModelArtsRpc: modelartsclient.NewModelArts(zrpc.MustNewClient(c.ModelArtsRpcConf)), + CephRpc: cephclient.NewCeph(zrpc.MustNewClient(c.CephRpcConf)), ACRpc: hpcacclient.NewHpcAC(zrpc.MustNewClient(c.ACRpcConf)), //THRpc: hpcthclient.NewHpcTH(zrpc.MustNewClient(c.THRpcConf)), //OctopusRpc: octopusclient.NewOctopus(zrpc.MustNewClient(c.OctopusRpcConf)), diff --git a/adaptor/PCM-STORAGE/PCM-CEPH/rpc/ceph/pcm-ceph.pb.go b/adaptor/PCM-STORAGE/PCM-CEPH/rpc/ceph/pcm-ceph.pb.go index 3f56ec5b..968b4120 100644 --- a/adaptor/PCM-STORAGE/PCM-CEPH/rpc/ceph/pcm-ceph.pb.go +++ b/adaptor/PCM-STORAGE/PCM-CEPH/rpc/ceph/pcm-ceph.pb.go @@ -385,6 +385,367 @@ func (x *StorageScreenResp) GetErrorMsg() string { return "" } +// *****************screen computing power Start************************ +type DailyPowerScreenReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DailyPowerScreenReq) Reset() { + *x = DailyPowerScreenReq{} + if protoimpl.UnsafeEnabled { + mi := &file_pcm_ceph_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DailyPowerScreenReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DailyPowerScreenReq) ProtoMessage() {} + +func (x *DailyPowerScreenReq) ProtoReflect() protoreflect.Message { + mi := &file_pcm_ceph_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DailyPowerScreenReq.ProtoReflect.Descriptor instead. +func (*DailyPowerScreenReq) Descriptor() ([]byte, []int) { + return file_pcm_ceph_proto_rawDescGZIP(), []int{3} +} + +type DailyPowerScreenResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalSize int32 `protobuf:"varint,1,opt,name=totalSize,proto3" json:"totalSize,omitempty"` // @gotags: copier:"TotalSize" + DailyComputerPowers []*DailyComputerPowers `protobuf:"bytes,2,rep,name=dailyComputerPowers,proto3" json:"dailyComputerPowers,omitempty"` // @gotags: copier:"DailyComputerPowers" + Code int32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` // @gotags: copier:"Code" + Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` // @gotags: copier:"Msg" + ErrorMsg string `protobuf:"bytes,5,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` // @gotags: copier:"ErrorMsg" +} + +func (x *DailyPowerScreenResp) Reset() { + *x = DailyPowerScreenResp{} + if protoimpl.UnsafeEnabled { + mi := &file_pcm_ceph_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DailyPowerScreenResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DailyPowerScreenResp) ProtoMessage() {} + +func (x *DailyPowerScreenResp) ProtoReflect() protoreflect.Message { + mi := &file_pcm_ceph_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DailyPowerScreenResp.ProtoReflect.Descriptor instead. +func (*DailyPowerScreenResp) Descriptor() ([]byte, []int) { + return file_pcm_ceph_proto_rawDescGZIP(), []int{4} +} + +func (x *DailyPowerScreenResp) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +func (x *DailyPowerScreenResp) GetDailyComputerPowers() []*DailyComputerPowers { + if x != nil { + return x.DailyComputerPowers + } + return nil +} + +func (x *DailyPowerScreenResp) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *DailyPowerScreenResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *DailyPowerScreenResp) GetErrorMsg() string { + if x != nil { + return x.ErrorMsg + } + return "" +} + +type DailyComputerPowers struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Date string `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"` // @gotags: copier:"Date" + ComputerPower float32 `protobuf:"fixed32,2,opt,name=computerPower,proto3" json:"computerPower,omitempty"` // @gotags: copier:"ComputerPower" +} + +func (x *DailyComputerPowers) Reset() { + *x = DailyComputerPowers{} + if protoimpl.UnsafeEnabled { + mi := &file_pcm_ceph_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DailyComputerPowers) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DailyComputerPowers) ProtoMessage() {} + +func (x *DailyComputerPowers) ProtoReflect() protoreflect.Message { + mi := &file_pcm_ceph_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DailyComputerPowers.ProtoReflect.Descriptor instead. +func (*DailyComputerPowers) Descriptor() ([]byte, []int) { + return file_pcm_ceph_proto_rawDescGZIP(), []int{5} +} + +func (x *DailyComputerPowers) GetDate() string { + if x != nil { + return x.Date + } + return "" +} + +func (x *DailyComputerPowers) GetComputerPower() float32 { + if x != nil { + return x.ComputerPower + } + return 0 +} + +type PerCenterComputerPowersReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PerCenterComputerPowersReq) Reset() { + *x = PerCenterComputerPowersReq{} + if protoimpl.UnsafeEnabled { + mi := &file_pcm_ceph_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PerCenterComputerPowersReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PerCenterComputerPowersReq) ProtoMessage() {} + +func (x *PerCenterComputerPowersReq) ProtoReflect() protoreflect.Message { + mi := &file_pcm_ceph_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PerCenterComputerPowersReq.ProtoReflect.Descriptor instead. +func (*PerCenterComputerPowersReq) Descriptor() ([]byte, []int) { + return file_pcm_ceph_proto_rawDescGZIP(), []int{6} +} + +type PerCenterComputerPowersResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalSize int32 `protobuf:"varint,1,opt,name=totalSize,proto3" json:"totalSize,omitempty"` // @gotags: copier:"TotalSize" + PerCenterComputerPowers []*PerCenterComputerPowers `protobuf:"bytes,2,rep,name=perCenterComputerPowers,proto3" json:"perCenterComputerPowers,omitempty"` // @gotags: copier:"DailyComputerPowers" + Code int32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` // @gotags: copier:"Code" + Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` // @gotags: copier:"Msg" + ErrorMsg string `protobuf:"bytes,5,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` // @gotags: copier:"ErrorMsg" +} + +func (x *PerCenterComputerPowersResp) Reset() { + *x = PerCenterComputerPowersResp{} + if protoimpl.UnsafeEnabled { + mi := &file_pcm_ceph_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PerCenterComputerPowersResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PerCenterComputerPowersResp) ProtoMessage() {} + +func (x *PerCenterComputerPowersResp) ProtoReflect() protoreflect.Message { + mi := &file_pcm_ceph_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PerCenterComputerPowersResp.ProtoReflect.Descriptor instead. +func (*PerCenterComputerPowersResp) Descriptor() ([]byte, []int) { + return file_pcm_ceph_proto_rawDescGZIP(), []int{7} +} + +func (x *PerCenterComputerPowersResp) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +func (x *PerCenterComputerPowersResp) GetPerCenterComputerPowers() []*PerCenterComputerPowers { + if x != nil { + return x.PerCenterComputerPowers + } + return nil +} + +func (x *PerCenterComputerPowersResp) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *PerCenterComputerPowersResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *PerCenterComputerPowersResp) GetErrorMsg() string { + if x != nil { + return x.ErrorMsg + } + return "" +} + +type PerCenterComputerPowers struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CenterName string `protobuf:"bytes,1,opt,name=centerName,proto3" json:"centerName,omitempty"` // @gotags: copier:"CenterName" + ComputerPower float32 `protobuf:"fixed32,2,opt,name=computerPower,proto3" json:"computerPower,omitempty"` // @gotags: copier:"ComputerPower" + JobCount int32 `protobuf:"varint,3,opt,name=jobCount,proto3" json:"jobCount,omitempty"` // @gotags: copier:"JobCount" + CenterId string `protobuf:"bytes,4,opt,name=centerId,proto3" json:"centerId,omitempty"` // @gotags: copier:"CenterId" +} + +func (x *PerCenterComputerPowers) Reset() { + *x = PerCenterComputerPowers{} + if protoimpl.UnsafeEnabled { + mi := &file_pcm_ceph_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PerCenterComputerPowers) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PerCenterComputerPowers) ProtoMessage() {} + +func (x *PerCenterComputerPowers) ProtoReflect() protoreflect.Message { + mi := &file_pcm_ceph_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PerCenterComputerPowers.ProtoReflect.Descriptor instead. +func (*PerCenterComputerPowers) Descriptor() ([]byte, []int) { + return file_pcm_ceph_proto_rawDescGZIP(), []int{8} +} + +func (x *PerCenterComputerPowers) GetCenterName() string { + if x != nil { + return x.CenterName + } + return "" +} + +func (x *PerCenterComputerPowers) GetComputerPower() float32 { + if x != nil { + return x.ComputerPower + } + return 0 +} + +func (x *PerCenterComputerPowers) GetJobCount() int32 { + if x != nil { + return x.JobCount + } + return 0 +} + +func (x *PerCenterComputerPowers) GetCenterId() string { + if x != nil { + return x.CenterId + } + return "" +} + var File_pcm_ceph_proto protoreflect.FileDescriptor var file_pcm_ceph_proto_rawDesc = []byte{ @@ -451,13 +812,69 @@ var file_pcm_ceph_proto_rawDesc = []byte{ 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, - 0x32, 0x50, 0x0a, 0x04, 0x43, 0x65, 0x70, 0x68, 0x12, 0x48, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x63, 0x72, 0x65, - 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x42, 0x07, 0x5a, 0x05, 0x2f, 0x63, 0x65, 0x70, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x22, 0x15, 0x0a, 0x13, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x63, + 0x72, 0x65, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x44, 0x61, 0x69, 0x6c, + 0x79, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x4f, + 0x0a, 0x13, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, + 0x6f, 0x77, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x13, 0x64, 0x61, 0x69, 0x6c, + 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, + 0x73, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, + 0x73, 0x67, 0x22, 0x4f, 0x0a, 0x13, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, + 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, + 0x77, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x50, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, + 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x22, 0xdb, 0x01, 0x0a, 0x1b, 0x50, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x43, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x5b, 0x0a, 0x17, 0x70, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x43, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, + 0x65, 0x72, 0x73, 0x52, 0x17, 0x70, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, + 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, + 0x73, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x22, + 0x97, 0x01, 0x0a, 0x17, 0x50, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x02, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, + 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x49, 0x64, 0x32, 0x90, 0x02, 0x0a, 0x04, 0x43, 0x65, + 0x70, 0x68, 0x12, 0x48, 0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x63, 0x72, + 0x65, 0x65, 0x6e, 0x12, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, + 0x1b, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x10, + 0x64, 0x61, 0x69, 0x6c, 0x79, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, + 0x12, 0x1d, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x61, 0x69, 0x6c, + 0x79, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, + 0x1e, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x61, 0x69, 0x6c, 0x79, + 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x6b, 0x0a, 0x1c, 0x70, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x12, + 0x24, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x43, 0x65, + 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x2e, 0x50, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x07, 0x5a, 0x05, + 0x2f, 0x63, 0x65, 0x70, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -472,21 +889,33 @@ func file_pcm_ceph_proto_rawDescGZIP() []byte { return file_pcm_ceph_proto_rawDescData } -var file_pcm_ceph_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_pcm_ceph_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_pcm_ceph_proto_goTypes = []interface{}{ - (*StorageScreenReq)(nil), // 0: template.StorageScreenReq - (*AiCenterInfos)(nil), // 1: template.AiCenterInfos - (*StorageScreenResp)(nil), // 2: template.StorageScreenResp + (*StorageScreenReq)(nil), // 0: template.StorageScreenReq + (*AiCenterInfos)(nil), // 1: template.AiCenterInfos + (*StorageScreenResp)(nil), // 2: template.StorageScreenResp + (*DailyPowerScreenReq)(nil), // 3: template.DailyPowerScreenReq + (*DailyPowerScreenResp)(nil), // 4: template.DailyPowerScreenResp + (*DailyComputerPowers)(nil), // 5: template.DailyComputerPowers + (*PerCenterComputerPowersReq)(nil), // 6: template.PerCenterComputerPowersReq + (*PerCenterComputerPowersResp)(nil), // 7: template.PerCenterComputerPowersResp + (*PerCenterComputerPowers)(nil), // 8: template.PerCenterComputerPowers } var file_pcm_ceph_proto_depIdxs = []int32{ 1, // 0: template.StorageScreenResp.aiCenterInfos:type_name -> template.AiCenterInfos - 0, // 1: template.Ceph.storageScreen:input_type -> template.StorageScreenReq - 2, // 2: template.Ceph.storageScreen:output_type -> template.StorageScreenResp - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 5, // 1: template.DailyPowerScreenResp.dailyComputerPowers:type_name -> template.DailyComputerPowers + 8, // 2: template.PerCenterComputerPowersResp.perCenterComputerPowers:type_name -> template.PerCenterComputerPowers + 0, // 3: template.Ceph.storageScreen:input_type -> template.StorageScreenReq + 3, // 4: template.Ceph.dailyPowerScreen:input_type -> template.DailyPowerScreenReq + 6, // 5: template.Ceph.perCenterComputerPowerScreen:input_type -> template.PerCenterComputerPowersReq + 2, // 6: template.Ceph.storageScreen:output_type -> template.StorageScreenResp + 4, // 7: template.Ceph.dailyPowerScreen:output_type -> template.DailyPowerScreenResp + 7, // 8: template.Ceph.perCenterComputerPowerScreen:output_type -> template.PerCenterComputerPowersResp + 6, // [6:9] is the sub-list for method output_type + 3, // [3:6] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_pcm_ceph_proto_init() } @@ -531,6 +960,78 @@ func file_pcm_ceph_proto_init() { return nil } } + file_pcm_ceph_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DailyPowerScreenReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pcm_ceph_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DailyPowerScreenResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pcm_ceph_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DailyComputerPowers); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pcm_ceph_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PerCenterComputerPowersReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pcm_ceph_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PerCenterComputerPowersResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pcm_ceph_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PerCenterComputerPowers); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -538,7 +1039,7 @@ func file_pcm_ceph_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pcm_ceph_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 9, NumExtensions: 0, NumServices: 1, }, diff --git a/adaptor/PCM-STORAGE/PCM-CEPH/rpc/ceph/pcm-ceph_grpc.pb.go b/adaptor/PCM-STORAGE/PCM-CEPH/rpc/ceph/pcm-ceph_grpc.pb.go index 9731f119..5afd6519 100644 --- a/adaptor/PCM-STORAGE/PCM-CEPH/rpc/ceph/pcm-ceph_grpc.pb.go +++ b/adaptor/PCM-STORAGE/PCM-CEPH/rpc/ceph/pcm-ceph_grpc.pb.go @@ -23,6 +23,8 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type CephClient interface { StorageScreen(ctx context.Context, in *StorageScreenReq, opts ...grpc.CallOption) (*StorageScreenResp, error) + DailyPowerScreen(ctx context.Context, in *DailyPowerScreenReq, opts ...grpc.CallOption) (*DailyPowerScreenResp, error) + PerCenterComputerPowerScreen(ctx context.Context, in *PerCenterComputerPowersReq, opts ...grpc.CallOption) (*PerCenterComputerPowersResp, error) } type cephClient struct { @@ -42,11 +44,31 @@ func (c *cephClient) StorageScreen(ctx context.Context, in *StorageScreenReq, op return out, nil } +func (c *cephClient) DailyPowerScreen(ctx context.Context, in *DailyPowerScreenReq, opts ...grpc.CallOption) (*DailyPowerScreenResp, error) { + out := new(DailyPowerScreenResp) + err := c.cc.Invoke(ctx, "/template.Ceph/dailyPowerScreen", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cephClient) PerCenterComputerPowerScreen(ctx context.Context, in *PerCenterComputerPowersReq, opts ...grpc.CallOption) (*PerCenterComputerPowersResp, error) { + out := new(PerCenterComputerPowersResp) + err := c.cc.Invoke(ctx, "/template.Ceph/perCenterComputerPowerScreen", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // CephServer is the server API for Ceph service. // All implementations must embed UnimplementedCephServer // for forward compatibility type CephServer interface { StorageScreen(context.Context, *StorageScreenReq) (*StorageScreenResp, error) + DailyPowerScreen(context.Context, *DailyPowerScreenReq) (*DailyPowerScreenResp, error) + PerCenterComputerPowerScreen(context.Context, *PerCenterComputerPowersReq) (*PerCenterComputerPowersResp, error) mustEmbedUnimplementedCephServer() } @@ -57,6 +79,12 @@ type UnimplementedCephServer struct { func (UnimplementedCephServer) StorageScreen(context.Context, *StorageScreenReq) (*StorageScreenResp, error) { return nil, status.Errorf(codes.Unimplemented, "method StorageScreen not implemented") } +func (UnimplementedCephServer) DailyPowerScreen(context.Context, *DailyPowerScreenReq) (*DailyPowerScreenResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DailyPowerScreen not implemented") +} +func (UnimplementedCephServer) PerCenterComputerPowerScreen(context.Context, *PerCenterComputerPowersReq) (*PerCenterComputerPowersResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method PerCenterComputerPowerScreen not implemented") +} func (UnimplementedCephServer) mustEmbedUnimplementedCephServer() {} // UnsafeCephServer may be embedded to opt out of forward compatibility for this service. @@ -88,6 +116,42 @@ func _Ceph_StorageScreen_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Ceph_DailyPowerScreen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DailyPowerScreenReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CephServer).DailyPowerScreen(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/template.Ceph/dailyPowerScreen", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CephServer).DailyPowerScreen(ctx, req.(*DailyPowerScreenReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Ceph_PerCenterComputerPowerScreen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PerCenterComputerPowersReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CephServer).PerCenterComputerPowerScreen(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/template.Ceph/perCenterComputerPowerScreen", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CephServer).PerCenterComputerPowerScreen(ctx, req.(*PerCenterComputerPowersReq)) + } + return interceptor(ctx, in, info, handler) +} + // Ceph_ServiceDesc is the grpc.ServiceDesc for Ceph service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -99,6 +163,14 @@ var Ceph_ServiceDesc = grpc.ServiceDesc{ MethodName: "storageScreen", Handler: _Ceph_StorageScreen_Handler, }, + { + MethodName: "dailyPowerScreen", + Handler: _Ceph_DailyPowerScreen_Handler, + }, + { + MethodName: "perCenterComputerPowerScreen", + Handler: _Ceph_PerCenterComputerPowerScreen_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "pcm-ceph.proto", diff --git a/adaptor/PCM-STORAGE/PCM-CEPH/rpc/cephclient/ceph.go b/adaptor/PCM-STORAGE/PCM-CEPH/rpc/cephclient/ceph.go index dbb33dd1..d23efe84 100644 --- a/adaptor/PCM-STORAGE/PCM-CEPH/rpc/cephclient/ceph.go +++ b/adaptor/PCM-STORAGE/PCM-CEPH/rpc/cephclient/ceph.go @@ -13,12 +13,20 @@ import ( ) type ( - AiCenterInfos = ceph.AiCenterInfos - StorageScreenReq = ceph.StorageScreenReq - StorageScreenResp = ceph.StorageScreenResp + AiCenterInfos = ceph.AiCenterInfos + DailyComputerPowers = ceph.DailyComputerPowers + DailyPowerScreenReq = ceph.DailyPowerScreenReq + DailyPowerScreenResp = ceph.DailyPowerScreenResp + PerCenterComputerPowers = ceph.PerCenterComputerPowers + PerCenterComputerPowersReq = ceph.PerCenterComputerPowersReq + PerCenterComputerPowersResp = ceph.PerCenterComputerPowersResp + StorageScreenReq = ceph.StorageScreenReq + StorageScreenResp = ceph.StorageScreenResp Ceph interface { StorageScreen(ctx context.Context, in *StorageScreenReq, opts ...grpc.CallOption) (*StorageScreenResp, error) + DailyPowerScreen(ctx context.Context, in *DailyPowerScreenReq, opts ...grpc.CallOption) (*DailyPowerScreenResp, error) + PerCenterComputerPowerScreen(ctx context.Context, in *PerCenterComputerPowersReq, opts ...grpc.CallOption) (*PerCenterComputerPowersResp, error) } defaultCeph struct { @@ -36,3 +44,13 @@ func (m *defaultCeph) StorageScreen(ctx context.Context, in *StorageScreenReq, o client := ceph.NewCephClient(m.cli.Conn()) return client.StorageScreen(ctx, in, opts...) } + +func (m *defaultCeph) DailyPowerScreen(ctx context.Context, in *DailyPowerScreenReq, opts ...grpc.CallOption) (*DailyPowerScreenResp, error) { + client := ceph.NewCephClient(m.cli.Conn()) + return client.DailyPowerScreen(ctx, in, opts...) +} + +func (m *defaultCeph) PerCenterComputerPowerScreen(ctx context.Context, in *PerCenterComputerPowersReq, opts ...grpc.CallOption) (*PerCenterComputerPowersResp, error) { + client := ceph.NewCephClient(m.cli.Conn()) + return client.PerCenterComputerPowerScreen(ctx, in, opts...) +} diff --git a/adaptor/PCM-STORAGE/PCM-CEPH/rpc/internal/server/cephserver.go b/adaptor/PCM-STORAGE/PCM-CEPH/rpc/internal/server/cephserver.go index d7fccda1..24130d68 100644 --- a/adaptor/PCM-STORAGE/PCM-CEPH/rpc/internal/server/cephserver.go +++ b/adaptor/PCM-STORAGE/PCM-CEPH/rpc/internal/server/cephserver.go @@ -26,3 +26,13 @@ func (s *CephServer) StorageScreen(ctx context.Context, in *ceph.StorageScreenRe l := logic.NewStorageScreenLogic(ctx, s.svcCtx) return l.StorageScreen(in) } + +func (s *CephServer) DailyPowerScreen(ctx context.Context, in *ceph.DailyPowerScreenReq) (*ceph.DailyPowerScreenResp, error) { + l := logic.NewDailyPowerScreenLogic(ctx, s.svcCtx) + return l.DailyPowerScreen(in) +} + +func (s *CephServer) PerCenterComputerPowerScreen(ctx context.Context, in *ceph.PerCenterComputerPowersReq) (*ceph.PerCenterComputerPowersResp, error) { + l := logic.NewPerCenterComputerPowerScreenLogic(ctx, s.svcCtx) + return l.PerCenterComputerPowerScreen(in) +} diff --git a/adaptor/PCM-STORAGE/PCM-CEPH/rpc/pb/pcm-ceph.proto b/adaptor/PCM-STORAGE/PCM-CEPH/rpc/pb/pcm-ceph.proto index 6e6a816e..6d1340e3 100644 --- a/adaptor/PCM-STORAGE/PCM-CEPH/rpc/pb/pcm-ceph.proto +++ b/adaptor/PCM-STORAGE/PCM-CEPH/rpc/pb/pcm-ceph.proto @@ -47,10 +47,51 @@ message StorageScreenResp{ /******************screen storage end*************************/ /******************screen computing power Start*************************/ +message DailyPowerScreenReq{ + +} + +message DailyPowerScreenResp{ + int32 totalSize = 1; // @gotags: copier:"TotalSize" + repeated DailyComputerPowers dailyComputerPowers = 2; // @gotags: copier:"DailyComputerPowers" + int32 code = 3; // @gotags: copier:"Code" + string msg = 4; // @gotags: copier:"Msg" + string error_msg =5;// @gotags: copier:"ErrorMsg" +} + +message DailyComputerPowers{ + string date = 1; // @gotags: copier:"Date" + float computerPower = 2; // @gotags: copier:"ComputerPower" +} + +message PerCenterComputerPowersReq{ + +} + +message PerCenterComputerPowersResp{ + int32 totalSize = 1; // @gotags: copier:"TotalSize" + repeated PerCenterComputerPowers perCenterComputerPowers = 2; // @gotags: copier:"DailyComputerPowers" + int32 code = 3; // @gotags: copier:"Code" + string msg = 4; // @gotags: copier:"Msg" + string error_msg =5;// @gotags: copier:"ErrorMsg" +} + +message PerCenterComputerPowers{ + string centerName = 1; // @gotags: copier:"CenterName" + float computerPower = 2; // @gotags: copier:"ComputerPower" + int32 jobCount = 3; // @gotags: copier:"JobCount" + string centerId = 4; // @gotags: copier:"CenterId" +} + + /******************screen computing power End*************************/ service Ceph { rpc storageScreen(StorageScreenReq) returns (StorageScreenResp); + + rpc dailyPowerScreen(DailyPowerScreenReq) returns (DailyPowerScreenResp); + + rpc perCenterComputerPowerScreen(PerCenterComputerPowersReq) returns (PerCenterComputerPowersResp); } \ No newline at end of file