| @@ -1,7 +1,7 @@ | |||||
| // Code generated by protoc-gen-go-grpc. DO NOT EDIT. | // Code generated by protoc-gen-go-grpc. DO NOT EDIT. | ||||
| // versions: | // versions: | ||||
| // - protoc-gen-go-grpc v1.2.0 | // - protoc-gen-go-grpc v1.2.0 | ||||
| // - protoc v3.12.4 | |||||
| // - protoc v3.21.12 | |||||
| // source: hpcAC.proto | // source: hpcAC.proto | ||||
| package hpcAC | package hpcAC | ||||
| @@ -30,6 +30,14 @@ type HpcACClient interface { | |||||
| SubmitJob(ctx context.Context, in *SubmitJobReq, opts ...grpc.CallOption) (*SubmitJobResp, error) | SubmitJob(ctx context.Context, in *SubmitJobReq, opts ...grpc.CallOption) (*SubmitJobResp, error) | ||||
| // ListJobManager list all job managers | // ListJobManager list all job managers | ||||
| ListJobManager(ctx context.Context, in *JobManagerReq, opts ...grpc.CallOption) (*ListJobManagerResp, error) | ListJobManager(ctx context.Context, in *JobManagerReq, opts ...grpc.CallOption) (*ListJobManagerResp, error) | ||||
| // FileContent 查看文件内容 | |||||
| FileContent(ctx context.Context, in *FileDataReq, opts ...grpc.CallOption) (*FileContentResp, error) | |||||
| // SelectQueueByUser 查询用户可访问队列列表 | |||||
| SelectQueueByUser(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*QueueResp, error) | |||||
| // QueryQueueDetails 查询队列资源详细信息 | |||||
| QueryQueueDetails(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*QueueDetailsResp, error) | |||||
| // /QueryUserQuotasLimit 查询用户资源限制信息 | |||||
| QueryUserQuotasLimit(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*UserQuotasLimitResp, error) | |||||
| } | } | ||||
| type hpcACClient struct { | type hpcACClient struct { | ||||
| @@ -76,6 +84,42 @@ func (c *hpcACClient) ListJobManager(ctx context.Context, in *JobManagerReq, opt | |||||
| return out, nil | return out, nil | ||||
| } | } | ||||
| func (c *hpcACClient) FileContent(ctx context.Context, in *FileDataReq, opts ...grpc.CallOption) (*FileContentResp, error) { | |||||
| out := new(FileContentResp) | |||||
| err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/FileContent", in, out, opts...) | |||||
| if err != nil { | |||||
| return nil, err | |||||
| } | |||||
| return out, nil | |||||
| } | |||||
| func (c *hpcACClient) SelectQueueByUser(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*QueueResp, error) { | |||||
| out := new(QueueResp) | |||||
| err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/SelectQueueByUser", in, out, opts...) | |||||
| if err != nil { | |||||
| return nil, err | |||||
| } | |||||
| return out, nil | |||||
| } | |||||
| func (c *hpcACClient) QueryQueueDetails(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*QueueDetailsResp, error) { | |||||
| out := new(QueueDetailsResp) | |||||
| err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/QueryQueueDetails", in, out, opts...) | |||||
| if err != nil { | |||||
| return nil, err | |||||
| } | |||||
| return out, nil | |||||
| } | |||||
| func (c *hpcACClient) QueryUserQuotasLimit(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*UserQuotasLimitResp, error) { | |||||
| out := new(UserQuotasLimitResp) | |||||
| err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/QueryUserQuotasLimit", in, out, opts...) | |||||
| if err != nil { | |||||
| return nil, err | |||||
| } | |||||
| return out, nil | |||||
| } | |||||
| // HpcACServer is the server API for HpcAC service. | // HpcACServer is the server API for HpcAC service. | ||||
| // All implementations must embed UnimplementedHpcACServer | // All implementations must embed UnimplementedHpcACServer | ||||
| // for forward compatibility | // for forward compatibility | ||||
| @@ -88,6 +132,14 @@ type HpcACServer interface { | |||||
| SubmitJob(context.Context, *SubmitJobReq) (*SubmitJobResp, error) | SubmitJob(context.Context, *SubmitJobReq) (*SubmitJobResp, error) | ||||
| // ListJobManager list all job managers | // ListJobManager list all job managers | ||||
| ListJobManager(context.Context, *JobManagerReq) (*ListJobManagerResp, error) | ListJobManager(context.Context, *JobManagerReq) (*ListJobManagerResp, error) | ||||
| // FileContent 查看文件内容 | |||||
| FileContent(context.Context, *FileDataReq) (*FileContentResp, error) | |||||
| // SelectQueueByUser 查询用户可访问队列列表 | |||||
| SelectQueueByUser(context.Context, *QueueReq) (*QueueResp, error) | |||||
| // QueryQueueDetails 查询队列资源详细信息 | |||||
| QueryQueueDetails(context.Context, *QueueReq) (*QueueDetailsResp, error) | |||||
| // /QueryUserQuotasLimit 查询用户资源限制信息 | |||||
| QueryUserQuotasLimit(context.Context, *QueueReq) (*UserQuotasLimitResp, error) | |||||
| mustEmbedUnimplementedHpcACServer() | mustEmbedUnimplementedHpcACServer() | ||||
| } | } | ||||
| @@ -107,6 +159,18 @@ func (UnimplementedHpcACServer) SubmitJob(context.Context, *SubmitJobReq) (*Subm | |||||
| func (UnimplementedHpcACServer) ListJobManager(context.Context, *JobManagerReq) (*ListJobManagerResp, error) { | func (UnimplementedHpcACServer) ListJobManager(context.Context, *JobManagerReq) (*ListJobManagerResp, error) { | ||||
| return nil, status.Errorf(codes.Unimplemented, "method ListJobManager not implemented") | return nil, status.Errorf(codes.Unimplemented, "method ListJobManager not implemented") | ||||
| } | } | ||||
| func (UnimplementedHpcACServer) FileContent(context.Context, *FileDataReq) (*FileContentResp, error) { | |||||
| return nil, status.Errorf(codes.Unimplemented, "method FileContent not implemented") | |||||
| } | |||||
| func (UnimplementedHpcACServer) SelectQueueByUser(context.Context, *QueueReq) (*QueueResp, error) { | |||||
| return nil, status.Errorf(codes.Unimplemented, "method SelectQueueByUser not implemented") | |||||
| } | |||||
| func (UnimplementedHpcACServer) QueryQueueDetails(context.Context, *QueueReq) (*QueueDetailsResp, error) { | |||||
| return nil, status.Errorf(codes.Unimplemented, "method QueryQueueDetails not implemented") | |||||
| } | |||||
| func (UnimplementedHpcACServer) QueryUserQuotasLimit(context.Context, *QueueReq) (*UserQuotasLimitResp, error) { | |||||
| return nil, status.Errorf(codes.Unimplemented, "method QueryUserQuotasLimit not implemented") | |||||
| } | |||||
| func (UnimplementedHpcACServer) mustEmbedUnimplementedHpcACServer() {} | func (UnimplementedHpcACServer) mustEmbedUnimplementedHpcACServer() {} | ||||
| // UnsafeHpcACServer may be embedded to opt out of forward compatibility for this service. | // UnsafeHpcACServer may be embedded to opt out of forward compatibility for this service. | ||||
| @@ -192,6 +256,78 @@ func _HpcAC_ListJobManager_Handler(srv interface{}, ctx context.Context, dec fun | |||||
| return interceptor(ctx, in, info, handler) | return interceptor(ctx, in, info, handler) | ||||
| } | } | ||||
| func _HpcAC_FileContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||||
| in := new(FileDataReq) | |||||
| if err := dec(in); err != nil { | |||||
| return nil, err | |||||
| } | |||||
| if interceptor == nil { | |||||
| return srv.(HpcACServer).FileContent(ctx, in) | |||||
| } | |||||
| info := &grpc.UnaryServerInfo{ | |||||
| Server: srv, | |||||
| FullMethod: "/hpcAC.hpcAC/FileContent", | |||||
| } | |||||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||||
| return srv.(HpcACServer).FileContent(ctx, req.(*FileDataReq)) | |||||
| } | |||||
| return interceptor(ctx, in, info, handler) | |||||
| } | |||||
| func _HpcAC_SelectQueueByUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||||
| in := new(QueueReq) | |||||
| if err := dec(in); err != nil { | |||||
| return nil, err | |||||
| } | |||||
| if interceptor == nil { | |||||
| return srv.(HpcACServer).SelectQueueByUser(ctx, in) | |||||
| } | |||||
| info := &grpc.UnaryServerInfo{ | |||||
| Server: srv, | |||||
| FullMethod: "/hpcAC.hpcAC/SelectQueueByUser", | |||||
| } | |||||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||||
| return srv.(HpcACServer).SelectQueueByUser(ctx, req.(*QueueReq)) | |||||
| } | |||||
| return interceptor(ctx, in, info, handler) | |||||
| } | |||||
| func _HpcAC_QueryQueueDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||||
| in := new(QueueReq) | |||||
| if err := dec(in); err != nil { | |||||
| return nil, err | |||||
| } | |||||
| if interceptor == nil { | |||||
| return srv.(HpcACServer).QueryQueueDetails(ctx, in) | |||||
| } | |||||
| info := &grpc.UnaryServerInfo{ | |||||
| Server: srv, | |||||
| FullMethod: "/hpcAC.hpcAC/QueryQueueDetails", | |||||
| } | |||||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||||
| return srv.(HpcACServer).QueryQueueDetails(ctx, req.(*QueueReq)) | |||||
| } | |||||
| return interceptor(ctx, in, info, handler) | |||||
| } | |||||
| func _HpcAC_QueryUserQuotasLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { | |||||
| in := new(QueueReq) | |||||
| if err := dec(in); err != nil { | |||||
| return nil, err | |||||
| } | |||||
| if interceptor == nil { | |||||
| return srv.(HpcACServer).QueryUserQuotasLimit(ctx, in) | |||||
| } | |||||
| info := &grpc.UnaryServerInfo{ | |||||
| Server: srv, | |||||
| FullMethod: "/hpcAC.hpcAC/QueryUserQuotasLimit", | |||||
| } | |||||
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { | |||||
| return srv.(HpcACServer).QueryUserQuotasLimit(ctx, req.(*QueueReq)) | |||||
| } | |||||
| return interceptor(ctx, in, info, handler) | |||||
| } | |||||
| // HpcAC_ServiceDesc is the grpc.ServiceDesc for HpcAC service. | // HpcAC_ServiceDesc is the grpc.ServiceDesc for HpcAC service. | ||||
| // It's only intended for direct use with grpc.RegisterService, | // It's only intended for direct use with grpc.RegisterService, | ||||
| // and not to be introspected or modified (even as a copy) | // and not to be introspected or modified (even as a copy) | ||||
| @@ -215,6 +351,22 @@ var HpcAC_ServiceDesc = grpc.ServiceDesc{ | |||||
| MethodName: "ListJobManager", | MethodName: "ListJobManager", | ||||
| Handler: _HpcAC_ListJobManager_Handler, | Handler: _HpcAC_ListJobManager_Handler, | ||||
| }, | }, | ||||
| { | |||||
| MethodName: "FileContent", | |||||
| Handler: _HpcAC_FileContent_Handler, | |||||
| }, | |||||
| { | |||||
| MethodName: "SelectQueueByUser", | |||||
| Handler: _HpcAC_SelectQueueByUser_Handler, | |||||
| }, | |||||
| { | |||||
| MethodName: "QueryQueueDetails", | |||||
| Handler: _HpcAC_QueryQueueDetails_Handler, | |||||
| }, | |||||
| { | |||||
| MethodName: "QueryUserQuotasLimit", | |||||
| Handler: _HpcAC_QueryUserQuotasLimit_Handler, | |||||
| }, | |||||
| }, | }, | ||||
| Streams: []grpc.StreamDesc{}, | Streams: []grpc.StreamDesc{}, | ||||
| Metadata: "hpcAC.proto", | Metadata: "hpcAC.proto", | ||||
| @@ -13,18 +13,28 @@ import ( | |||||
| ) | ) | ||||
| type ( | type ( | ||||
| HistoryJob = hpcAC.HistoryJob | |||||
| Job = hpcAC.Job | |||||
| JobManager = hpcAC.JobManager | |||||
| JobManagerReq = hpcAC.JobManagerReq | |||||
| ListHistoryJobReq = hpcAC.ListHistoryJobReq | |||||
| ListHistoryJobResp = hpcAC.ListHistoryJobResp | |||||
| ListJobManagerResp = hpcAC.ListJobManagerResp | |||||
| ListJobReq = hpcAC.ListJobReq | |||||
| ListJobResp = hpcAC.ListJobResp | |||||
| MapAppJobInfo = hpcAC.MapAppJobInfo | |||||
| SubmitJobReq = hpcAC.SubmitJobReq | |||||
| SubmitJobResp = hpcAC.SubmitJobResp | |||||
| FileContentResp = hpcAC.FileContentResp | |||||
| FileDataReq = hpcAC.FileDataReq | |||||
| FileDataResp = hpcAC.FileDataResp | |||||
| HistoryJob = hpcAC.HistoryJob | |||||
| Job = hpcAC.Job | |||||
| JobManager = hpcAC.JobManager | |||||
| JobManagerReq = hpcAC.JobManagerReq | |||||
| ListHistoryJobReq = hpcAC.ListHistoryJobReq | |||||
| ListHistoryJobResp = hpcAC.ListHistoryJobResp | |||||
| ListJobManagerResp = hpcAC.ListJobManagerResp | |||||
| ListJobReq = hpcAC.ListJobReq | |||||
| ListJobResp = hpcAC.ListJobResp | |||||
| MapAppJobInfo = hpcAC.MapAppJobInfo | |||||
| QueueData = hpcAC.QueueData | |||||
| QueueDetailsData = hpcAC.QueueDetailsData | |||||
| QueueDetailsResp = hpcAC.QueueDetailsResp | |||||
| QueueReq = hpcAC.QueueReq | |||||
| QueueResp = hpcAC.QueueResp | |||||
| SubmitJobReq = hpcAC.SubmitJobReq | |||||
| SubmitJobResp = hpcAC.SubmitJobResp | |||||
| UserQuotasLimitData = hpcAC.UserQuotasLimitData | |||||
| UserQuotasLimitResp = hpcAC.UserQuotasLimitResp | |||||
| HpcAC interface { | HpcAC interface { | ||||
| // ListJob list all jobs | // ListJob list all jobs | ||||
| @@ -35,6 +45,14 @@ type ( | |||||
| SubmitJob(ctx context.Context, in *SubmitJobReq, opts ...grpc.CallOption) (*SubmitJobResp, error) | SubmitJob(ctx context.Context, in *SubmitJobReq, opts ...grpc.CallOption) (*SubmitJobResp, error) | ||||
| // ListJobManager list all job managers | // ListJobManager list all job managers | ||||
| ListJobManager(ctx context.Context, in *JobManagerReq, opts ...grpc.CallOption) (*ListJobManagerResp, error) | ListJobManager(ctx context.Context, in *JobManagerReq, opts ...grpc.CallOption) (*ListJobManagerResp, error) | ||||
| // FileContent 查看文件内容 | |||||
| FileContent(ctx context.Context, in *FileDataReq, opts ...grpc.CallOption) (*FileContentResp, error) | |||||
| // SelectQueueByUser 查询用户可访问队列列表 | |||||
| SelectQueueByUser(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*QueueResp, error) | |||||
| // QueryQueueDetails 查询队列资源详细信息 | |||||
| QueryQueueDetails(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*QueueDetailsResp, error) | |||||
| // QueryUserQuotasLimit 查询用户资源限制信息 | |||||
| QueryUserQuotasLimit(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*UserQuotasLimitResp, error) | |||||
| } | } | ||||
| defaultHpcAC struct { | defaultHpcAC struct { | ||||
| @@ -71,3 +89,27 @@ func (m *defaultHpcAC) ListJobManager(ctx context.Context, in *JobManagerReq, op | |||||
| client := hpcAC.NewHpcACClient(m.cli.Conn()) | client := hpcAC.NewHpcACClient(m.cli.Conn()) | ||||
| return client.ListJobManager(ctx, in, opts...) | return client.ListJobManager(ctx, in, opts...) | ||||
| } | } | ||||
| // FileContent 查看文件内容 | |||||
| func (m *defaultHpcAC) FileContent(ctx context.Context, in *FileDataReq, opts ...grpc.CallOption) (*FileContentResp, error) { | |||||
| client := hpcAC.NewHpcACClient(m.cli.Conn()) | |||||
| return client.FileContent(ctx, in, opts...) | |||||
| } | |||||
| // SelectQueueByUser 查询用户可访问队列列表 | |||||
| func (m *defaultHpcAC) SelectQueueByUser(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*QueueResp, error) { | |||||
| client := hpcAC.NewHpcACClient(m.cli.Conn()) | |||||
| return client.SelectQueueByUser(ctx, in, opts...) | |||||
| } | |||||
| // QueryQueueDetails 查询队列资源详细信息 | |||||
| func (m *defaultHpcAC) QueryQueueDetails(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*QueueDetailsResp, error) { | |||||
| client := hpcAC.NewHpcACClient(m.cli.Conn()) | |||||
| return client.QueryQueueDetails(ctx, in, opts...) | |||||
| } | |||||
| // QueryUserQuotasLimit 查询用户资源限制信息 | |||||
| func (m *defaultHpcAC) QueryUserQuotasLimit(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*UserQuotasLimitResp, error) { | |||||
| client := hpcAC.NewHpcACClient(m.cli.Conn()) | |||||
| return client.QueryUserQuotasLimit(ctx, in, opts...) | |||||
| } | |||||
| @@ -26,7 +26,7 @@ func NewFileContentLogic(ctx context.Context, svcCtx *svc.ServiceContext) *FileC | |||||
| } | } | ||||
| } | } | ||||
| // file content 查看文件内容 | |||||
| // FileContent 查看文件内容 | |||||
| func (l *FileContentLogic) FileContent(in *hpcAC.FileDataReq) (*hpcAC.FileContentResp, error) { | func (l *FileContentLogic) FileContent(in *hpcAC.FileDataReq) (*hpcAC.FileContentResp, error) { | ||||
| var resp hpcAC.FileContentResp | var resp hpcAC.FileContentResp | ||||
| url := "/hpc/openapi/v2/file/content" | url := "/hpc/openapi/v2/file/content" | ||||
| @@ -24,7 +24,7 @@ func NewQueryQueueDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) | |||||
| } | } | ||||
| } | } | ||||
| // userquotas/queues 查询队列资源详细信息 | |||||
| // QueryQueueDetails 查询队列资源详细信息 | |||||
| func (l *QueryQueueDetailsLogic) QueryQueueDetails(in *hpcAC.QueueReq) (*hpcAC.QueueDetailsResp, error) { | func (l *QueryQueueDetailsLogic) QueryQueueDetails(in *hpcAC.QueueReq) (*hpcAC.QueueDetailsResp, error) { | ||||
| resp := hpcAC.QueueDetailsResp{} | resp := hpcAC.QueueDetailsResp{} | ||||
| url := fmt.Sprintf("/hpc/openapi/v2/userquotas/queues?strJobManagerID=%s", in.StrJobManagerID) | url := fmt.Sprintf("/hpc/openapi/v2/userquotas/queues?strJobManagerID=%s", in.StrJobManagerID) | ||||
| @@ -25,7 +25,7 @@ func NewQueryUserQuotasLimitLogic(ctx context.Context, svcCtx *svc.ServiceContex | |||||
| } | } | ||||
| } | } | ||||
| // hpc/openapi/v2/userquotas/userlimit 查询用户资源限制信息 | |||||
| // QueryUserQuotasLimit 查询用户资源限制信息 | |||||
| func (l *QueryUserQuotasLimitLogic) QueryUserQuotasLimit(in *hpcAC.QueueReq) (*hpcAC.UserQuotasLimitResp, error) { | func (l *QueryUserQuotasLimitLogic) QueryUserQuotasLimit(in *hpcAC.QueueReq) (*hpcAC.UserQuotasLimitResp, error) { | ||||
| resp := hpcAC.UserQuotasLimitResp{} | resp := hpcAC.UserQuotasLimitResp{} | ||||
| url := fmt.Sprintf("hpc/openapi/v2/userquotas/userlimit?strJobManagerID=%s", in.StrJobManagerID) | url := fmt.Sprintf("hpc/openapi/v2/userquotas/userlimit?strJobManagerID=%s", in.StrJobManagerID) | ||||
| @@ -25,7 +25,7 @@ func NewSelectQueueByUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) | |||||
| } | } | ||||
| } | } | ||||
| // queuenames/users/{username} 查询用户可访问队列列表 | |||||
| // SelectQueueByUser 查询用户可访问队列列表 | |||||
| func (l *SelectQueueByUserLogic) SelectQueueByUser(in *hpcAC.QueueReq) (*hpcAC.QueueResp, error) { | func (l *SelectQueueByUserLogic) SelectQueueByUser(in *hpcAC.QueueReq) (*hpcAC.QueueResp, error) { | ||||
| resp := hpcAC.QueueResp{} | resp := hpcAC.QueueResp{} | ||||
| url := fmt.Sprintf("/hpc/openapi/v2/queuenames/users/%s/?strJobManagerID=%s", in.User, in.StrJobManagerID) | url := fmt.Sprintf("/hpc/openapi/v2/queuenames/users/%s/?strJobManagerID=%s", in.User, in.StrJobManagerID) | ||||
| @@ -45,3 +45,27 @@ func (s *HpcACServer) ListJobManager(ctx context.Context, in *hpcAC.JobManagerRe | |||||
| l := logic.NewListJobManagerLogic(ctx, s.svcCtx) | l := logic.NewListJobManagerLogic(ctx, s.svcCtx) | ||||
| return l.ListJobManager(in) | return l.ListJobManager(in) | ||||
| } | } | ||||
| // FileContent 查看文件内容 | |||||
| func (s *HpcACServer) FileContent(ctx context.Context, in *hpcAC.FileDataReq) (*hpcAC.FileContentResp, error) { | |||||
| l := logic.NewFileContentLogic(ctx, s.svcCtx) | |||||
| return l.FileContent(in) | |||||
| } | |||||
| // SelectQueueByUser 查询用户可访问队列列表 | |||||
| func (s *HpcACServer) SelectQueueByUser(ctx context.Context, in *hpcAC.QueueReq) (*hpcAC.QueueResp, error) { | |||||
| l := logic.NewSelectQueueByUserLogic(ctx, s.svcCtx) | |||||
| return l.SelectQueueByUser(in) | |||||
| } | |||||
| // QueryQueueDetails 查询队列资源详细信息 | |||||
| func (s *HpcACServer) QueryQueueDetails(ctx context.Context, in *hpcAC.QueueReq) (*hpcAC.QueueDetailsResp, error) { | |||||
| l := logic.NewQueryQueueDetailsLogic(ctx, s.svcCtx) | |||||
| return l.QueryQueueDetails(in) | |||||
| } | |||||
| // QueryUserQuotasLimit 查询用户资源限制信息 | |||||
| func (s *HpcACServer) QueryUserQuotasLimit(ctx context.Context, in *hpcAC.QueueReq) (*hpcAC.UserQuotasLimitResp, error) { | |||||
| l := logic.NewQueryUserQuotasLimitLogic(ctx, s.svcCtx) | |||||
| return l.QueryUserQuotasLimit(in) | |||||
| } | |||||
| @@ -7,8 +7,8 @@ option go_package = "/hpcAC"; | |||||
| message JobManager{ | message JobManager{ | ||||
| string job_manager_type = 1; // @gotags: copier:"JobManagerType", json:"JobManagerType" | string job_manager_type = 1; // @gotags: copier:"JobManagerType", json:"JobManagerType" | ||||
| string job_manager_addr = 2; // @gotags: copier:"JobManagerAddr", json:"JobManagerAddr" | string job_manager_addr = 2; // @gotags: copier:"JobManagerAddr", json:"JobManagerAddr" | ||||
| int64 id = 3; // @gotags: copier:"ID", json:"id" | |||||
| string text = 4; // @gotags: copier:"Text", json:"text" | |||||
| int64 id = 3; // @gotags: copier:"ID", json:"id" | |||||
| string text = 4; // @gotags: copier:"Text", json:"text" | |||||
| string job_manager_port = 5; // @gotags: copier:"JobManagerPort", json:"JobManagerPort" | string job_manager_port = 5; // @gotags: copier:"JobManagerPort", json:"JobManagerPort" | ||||
| } | } | ||||
| @@ -16,77 +16,77 @@ message JobManagerReq{ | |||||
| } | } | ||||
| message ListJobManagerResp{ | message ListJobManagerResp{ | ||||
| string code = 1; // @gotags: copier:"Code", json:"code" | |||||
| string msg = 2; // @gotags: copier:"Msg", json:"msg" | |||||
| repeated JobManager job_managers = 3; // @gotags: copier:"JobManagers", json:"data" | |||||
| string code = 1; // @gotags: copier:"Code", json:"code" | |||||
| string msg = 2; // @gotags: copier:"Msg", json:"msg" | |||||
| repeated JobManager job_managers = 3; // @gotags: copier:"JobManagers", json:"data" | |||||
| } | } | ||||
| /******************cluster End*************************/ | /******************cluster End*************************/ | ||||
| /******************Job Start*************************/ | /******************Job Start*************************/ | ||||
| message job{ | message job{ | ||||
| string job_id = 1; // @gotags: copier:"JobId" | |||||
| string job_name = 2; // @gotags: copier:"Name" | |||||
| string job_status = 3; // @gotags: copier:"JobState" | |||||
| string queue = 4; // @gotags: copier:"Partition" | |||||
| string user = 5; // @gotags: copier:"UserId" | |||||
| string node_used = 6; // @gotags: copier:"ExcNodes" | |||||
| int32 proc_num_used = 7; // @gotags: copier:"NumCpus" | |||||
| string job_start_time = 8; // @gotags: copier:"StartTime" | |||||
| string job_run_time = 9; // @gotags: copier:"JobRunTime" | |||||
| string job_manager_id = 10; // @gotags: copier:"JobmanagerId" | |||||
| string job_id = 1; // @gotags: copier:"JobId" | |||||
| string job_name = 2; // @gotags: copier:"Name" | |||||
| string job_status = 3; // @gotags: copier:"JobState" | |||||
| string queue = 4; // @gotags: copier:"Partition" | |||||
| string user = 5; // @gotags: copier:"UserId" | |||||
| string node_used = 6; // @gotags: copier:"ExcNodes" | |||||
| int32 proc_num_used = 7; // @gotags: copier:"NumCpus" | |||||
| string job_start_time = 8; // @gotags: copier:"StartTime" | |||||
| string job_run_time = 9; // @gotags: copier:"JobRunTime" | |||||
| string job_manager_id = 10; // @gotags: copier:"JobmanagerId" | |||||
| string job_manager_name = 11; // @gotags: copier:"JobmanagerName" | string job_manager_name = 11; // @gotags: copier:"JobmanagerName" | ||||
| string job_manager_type = 12; // @gotags: copier:"JobmanagerType" | string job_manager_type = 12; // @gotags: copier:"JobmanagerType" | ||||
| string error_path = 13; // @gotags: copier:"ErrorPath" | |||||
| string output_path = 14; // @gotags: copier:"OutputPath" | |||||
| string work_dir = 15; // @gotags: copier:"WorkDir" | |||||
| string reason = 16; // @gotags: copier:"Reason" | |||||
| string app_type = 17; // @gotags: copier:"AppType" | |||||
| string error_path = 13; // @gotags: copier:"ErrorPath" | |||||
| string output_path = 14; // @gotags: copier:"OutputPath" | |||||
| string work_dir = 15; // @gotags: copier:"WorkDir" | |||||
| string reason = 16; // @gotags: copier:"Reason" | |||||
| string app_type = 17; // @gotags: copier:"AppType" | |||||
| } | } | ||||
| message ListJobReq{ | message ListJobReq{ | ||||
| } | } | ||||
| message ListJobResp{ | message ListJobResp{ | ||||
| uint32 code = 1; // @gotags: copier:"Code" | |||||
| string msg = 2; // @gotags: copier:"Msg" | |||||
| uint32 code = 1; // @gotags: copier:"Code" | |||||
| string msg = 2; // @gotags: copier:"Msg" | |||||
| uint32 record_count = 3; // @gotags: copier:"RecordCount" | uint32 record_count = 3; // @gotags: copier:"RecordCount" | ||||
| repeated job jobs = 4; // @gotags: copier:"Jobs" | |||||
| repeated job jobs = 4; // @gotags: copier:"Jobs" | |||||
| } | } | ||||
| /******************Job End*************************/ | /******************Job End*************************/ | ||||
| /******************History Job Start*************************/ | /******************History Job Start*************************/ | ||||
| message historyJob{ | message historyJob{ | ||||
| string acct_time = 1; // @gotags: copier:"AcctTime" | |||||
| string app_type = 2; // @gotags: copier:"AppType" | |||||
| string job_end_time = 3; // @gotags: copier:"End" | |||||
| string job_exec_host = 4; // @gotags: copier:"Nodes" | |||||
| int32 job_exit_status = 5; // @gotags: copier:"ExitCode" | |||||
| int64 job_id = 6; // @gotags: copier:"JobId" | |||||
| string job_name = 7; // @gotags: copier:"JobName" | |||||
| string job_queue_time = 8; // @gotags: copier:"JobQueueTime" | |||||
| string job_start_time = 9; // @gotags: copier:"Start" | |||||
| string job_state = 10; // @gotags: copier:"State" | |||||
| string acct_time = 1; // @gotags: copier:"AcctTime" | |||||
| string app_type = 2; // @gotags: copier:"AppType" | |||||
| string job_end_time = 3; // @gotags: copier:"End" | |||||
| string job_exec_host = 4; // @gotags: copier:"Nodes" | |||||
| int32 job_exit_status = 5; // @gotags: copier:"ExitCode" | |||||
| int64 job_id = 6; // @gotags: copier:"JobId" | |||||
| string job_name = 7; // @gotags: copier:"JobName" | |||||
| string job_queue_time = 8; // @gotags: copier:"JobQueueTime" | |||||
| string job_start_time = 9; // @gotags: copier:"Start" | |||||
| string job_state = 10; // @gotags: copier:"State" | |||||
| string job_walltime_used = 11; // @gotags: copier:"JobWalltimeUsed" | string job_walltime_used = 11; // @gotags: copier:"JobWalltimeUsed" | ||||
| int64 job_manager_id = 12; // @gotags: copier:"JobManagerId" | |||||
| int32 node_ct = 13; // @gotags: copier:"AllocNodes" | |||||
| string queue = 14; // @gotags: copier:"Partition" | |||||
| string user_name = 15; // @gotags: copier:"User" | |||||
| string workdir = 16; // @gotags: copier:"WorkDir" | |||||
| int64 job_manager_id = 12; // @gotags: copier:"JobManagerId" | |||||
| int32 node_ct = 13; // @gotags: copier:"AllocNodes" | |||||
| string queue = 14; // @gotags: copier:"Partition" | |||||
| string user_name = 15; // @gotags: copier:"User" | |||||
| string workdir = 16; // @gotags: copier:"WorkDir" | |||||
| } | } | ||||
| message ListHistoryJobReq{ | message ListHistoryJobReq{ | ||||
| string startTime = 1;// @gotags: copier:"StartTime" | |||||
| string endTime = 2;// @gotags: copier:"EndTime" | |||||
| string timeType = 3;// @gotags: copier:"TimeType" | |||||
| int32 start = 4;// @gotags: copier:"Start" | |||||
| int32 limit = 5;// @gotags: copier:"Limit" | |||||
| string startTime = 1;// @gotags: copier:"StartTime" | |||||
| string endTime = 2;// @gotags: copier:"EndTime" | |||||
| string timeType = 3;// @gotags: copier:"TimeType" | |||||
| int32 start = 4;// @gotags: copier:"Start" | |||||
| int32 limit = 5;// @gotags: copier:"Limit" | |||||
| int32 isQueryByQueueTime = 6;// @gotags: copier:"IsQueryByQueueTime" | int32 isQueryByQueueTime = 6;// @gotags: copier:"IsQueryByQueueTime" | ||||
| } | } | ||||
| message ListHistoryJobResp{ | message ListHistoryJobResp{ | ||||
| uint32 code = 1; // @gotags: copier:"Code" | |||||
| string msg = 2; // @gotags: copier:"Msg" | |||||
| uint32 code = 1; // @gotags: copier:"Code" | |||||
| string msg = 2; // @gotags: copier:"Msg" | |||||
| uint32 record_count = 3; // @gotags: copier:"RecordCount" | uint32 record_count = 3; // @gotags: copier:"RecordCount" | ||||
| repeated historyJob history_jobs = 4; // @gotags: copier:"HistoryJobs" | repeated historyJob history_jobs = 4; // @gotags: copier:"HistoryJobs" | ||||
| } | } | ||||
| @@ -247,15 +247,16 @@ service hpcAC { | |||||
| // ListJobManager list all job managers | // ListJobManager list all job managers | ||||
| rpc ListJobManager(JobManagerReq) returns (ListJobManagerResp); | rpc ListJobManager(JobManagerReq) returns (ListJobManagerResp); | ||||
| //file content 查看文件内容 | |||||
| //FileContent 查看文件内容 | |||||
| rpc FileContent(FileDataReq) returns (FileContentResp); | rpc FileContent(FileDataReq) returns (FileContentResp); | ||||
| //queuenames/users/{username} 查询用户可访问队列列表 | |||||
| //SelectQueueByUser 查询用户可访问队列列表 | |||||
| rpc SelectQueueByUser(QueueReq) returns(QueueResp); | rpc SelectQueueByUser(QueueReq) returns(QueueResp); | ||||
| //userquotas/queues 查询队列资源详细信息 | |||||
| //QueryQueueDetails 查询队列资源详细信息 | |||||
| rpc QueryQueueDetails(QueueReq) returns(QueueDetailsResp); | rpc QueryQueueDetails(QueueReq) returns(QueueDetailsResp); | ||||
| ///hpc/openapi/v2/userquotas/userlimit 查询用户资源限制信息 | |||||
| ///QueryUserQuotasLimit 查询用户资源限制信息 | |||||
| rpc QueryUserQuotasLimit(QueueReq) returns(UserQuotasLimitResp); | rpc QueryUserQuotasLimit(QueueReq) returns(UserQuotasLimitResp); | ||||
| } | } | ||||