From d4096820469e31b578503d96e4e74cdcb6baa449 Mon Sep 17 00:00:00 2001 From: devad Date: Wed, 3 Jan 2024 16:01:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=81=9C=E3=80=81=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E6=8E=A5=E5=8F=A3=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: devad --- api/desc/pcm.api | 4 +- .../logic/apps/pauseappbyappnamelogic.go | 17 +++- .../logic/apps/startappbyappnamelogic.go | 17 +++- pkg/constants/task.go | 2 + .../participantservice/participantservice.go | 16 ++++ .../participantservice/pauselistlogic.go | 36 +++++++++ .../participantservice/startlistlogic.go | 36 +++++++++ .../participantserviceserver.go | 12 +++ rpc/pb/pcmCore.proto | 6 ++ rpc/pcmCore/pcmCore.pb.go | 48 +++++++----- rpc/pcmCore/pcmCore_grpc.pb.go | 78 +++++++++++++++++++ 11 files changed, 246 insertions(+), 26 deletions(-) create mode 100644 rpc/internal/logic/participantservice/pauselistlogic.go create mode 100644 rpc/internal/logic/participantservice/startlistlogic.go diff --git a/api/desc/pcm.api b/api/desc/pcm.api index 8ee15db0b..a286de76a 100644 --- a/api/desc/pcm.api +++ b/api/desc/pcm.api @@ -561,9 +561,9 @@ service pcm { @doc "暂停应用" @handler PauseAppByAppName - put /apps/pauseApp (DeleteAppReq) returns (AppTaskResp) + put /apps/pauseApp (DeleteAppReq) returns (AppResp) @doc "启动应用" @handler StartAppByAppName - put /apps/startApp (DeleteAppReq) returns (AppTaskResp) + put /apps/startApp (DeleteAppReq) returns (AppResp) } \ No newline at end of file diff --git a/api/internal/logic/apps/pauseappbyappnamelogic.go b/api/internal/logic/apps/pauseappbyappnamelogic.go index 07106ee3f..6dd39a4e2 100644 --- a/api/internal/logic/apps/pauseappbyappnamelogic.go +++ b/api/internal/logic/apps/pauseappbyappnamelogic.go @@ -2,6 +2,8 @@ package apps import ( "context" + "gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/constants" + "gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/models" "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc" "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/types" @@ -23,8 +25,17 @@ func NewPauseAppByAppNameLogic(ctx context.Context, svcCtx *svc.ServiceContext) } } -func (l *PauseAppByAppNameLogic) PauseAppByAppName(req *types.DeleteAppReq) (resp *types.AppTaskResp, err error) { - // todo: add your logic here and delete this line - +func (l *PauseAppByAppNameLogic) PauseAppByAppName(req *types.DeleteAppReq) (resp *types.AppResp, err error) { + resp = &types.AppResp{} + var task = &Task{} + //查询应用的yamlString + l.svcCtx.DbEngin.Raw(`select * from task where ns_id= ? and name= ? AND deleted_at IS NULL`, req.NsID, req.Name).Scan(&task) + if task.Id == 0 { + resp.Code = 500 + resp.Msg = "App not fount" + return resp, err + } + // 将子任务状态修改为待暂停 + l.svcCtx.DbEngin.Model(&models.Cloud{}).Where("task_id", task.Id).Update("status", constants.WaitPause) return } diff --git a/api/internal/logic/apps/startappbyappnamelogic.go b/api/internal/logic/apps/startappbyappnamelogic.go index deca3677c..11d414867 100644 --- a/api/internal/logic/apps/startappbyappnamelogic.go +++ b/api/internal/logic/apps/startappbyappnamelogic.go @@ -2,6 +2,8 @@ package apps import ( "context" + "gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/constants" + "gitlink.org.cn/jcce-pcm/pcm-coordinator/pkg/models" "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/svc" "gitlink.org.cn/jcce-pcm/pcm-coordinator/api/internal/types" @@ -23,8 +25,17 @@ func NewStartAppByAppNameLogic(ctx context.Context, svcCtx *svc.ServiceContext) } } -func (l *StartAppByAppNameLogic) StartAppByAppName(req *types.DeleteAppReq) (resp *types.AppTaskResp, err error) { - // todo: add your logic here and delete this line - +func (l *StartAppByAppNameLogic) StartAppByAppName(req *types.DeleteAppReq) (resp *types.AppResp, err error) { + resp = &types.AppResp{} + var task = &Task{} + //查询应用的yamlString + l.svcCtx.DbEngin.Raw(`select * from task where ns_id= ? and name= ? AND deleted_at IS NULL`, req.NsID, req.Name).Scan(&task) + if task.Id == 0 { + resp.Code = 500 + resp.Msg = "App not fount" + return resp, err + } + // 将子任务状态修改为待启动 + l.svcCtx.DbEngin.Model(&models.Cloud{}).Where("task_id", task.Id).Update("status", constants.WaitStart) return } diff --git a/pkg/constants/task.go b/pkg/constants/task.go index 6bc7ee959..daf8879f4 100644 --- a/pkg/constants/task.go +++ b/pkg/constants/task.go @@ -24,4 +24,6 @@ const ( Succeeded = "Succeeded" Failed = "Failed" WaitRestart = "WaitRestart" + WaitPause = "WaitPause" + WaitStart = "WaitStart" ) diff --git a/rpc/client/participantservice/participantservice.go b/rpc/client/participantservice/participantservice.go index 9aa527a66..172a7ba37 100644 --- a/rpc/client/participantservice/participantservice.go +++ b/rpc/client/participantservice/participantservice.go @@ -66,6 +66,10 @@ type ( DeleteList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) // RestartList 重启任务列表 RestartList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) + // PauseList 暂停任务列表 + PauseList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) + // StartList 暂停任务列表 + StartList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) } defaultParticipantService struct { @@ -144,3 +148,15 @@ func (m *defaultParticipantService) RestartList(ctx context.Context, in *ApplyLi client := pcmCore.NewParticipantServiceClient(m.cli.Conn()) return client.RestartList(ctx, in, opts...) } + +// PauseList 暂停任务列表 +func (m *defaultParticipantService) PauseList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) { + client := pcmCore.NewParticipantServiceClient(m.cli.Conn()) + return client.PauseList(ctx, in, opts...) +} + +// StartList 暂停任务列表 +func (m *defaultParticipantService) StartList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) { + client := pcmCore.NewParticipantServiceClient(m.cli.Conn()) + return client.StartList(ctx, in, opts...) +} diff --git a/rpc/internal/logic/participantservice/pauselistlogic.go b/rpc/internal/logic/participantservice/pauselistlogic.go new file mode 100644 index 000000000..f459fd03c --- /dev/null +++ b/rpc/internal/logic/participantservice/pauselistlogic.go @@ -0,0 +1,36 @@ +package participantservicelogic + +import ( + "context" + + "gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/internal/svc" + "gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/pcmCore" + + "github.com/zeromicro/go-zero/core/logx" +) + +type PauseListLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewPauseListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PauseListLogic { + return &PauseListLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// PauseList 暂停任务列表 +func (l *PauseListLogic) PauseList(in *pcmCore.ApplyListReq) (*pcmCore.ApplyListResp, error) { + result := pcmCore.ApplyListResp{ + InfoList: make([]*pcmCore.ApplyInfo, 0), + } + l.svcCtx.DbEngin.Raw("SELECT sppi.`name` as ParticipantName, c.ns_id as namespace,c.name as name , c.kind as kind FROM cloud c,sc_participant_phy_info sppi where c.`status` = 'WaitPause' and sppi.id = c.participant_id").Scan(&result.InfoList) + if len(result.InfoList) != 0 { + l.svcCtx.DbEngin.Exec("update cloud set status = ? where status = ?", "Paused", "WaitPause") + } + return &result, nil +} diff --git a/rpc/internal/logic/participantservice/startlistlogic.go b/rpc/internal/logic/participantservice/startlistlogic.go new file mode 100644 index 000000000..20429cad9 --- /dev/null +++ b/rpc/internal/logic/participantservice/startlistlogic.go @@ -0,0 +1,36 @@ +package participantservicelogic + +import ( + "context" + + "gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/internal/svc" + "gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/pcmCore" + + "github.com/zeromicro/go-zero/core/logx" +) + +type StartListLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewStartListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *StartListLogic { + return &StartListLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// StartList 启动任务列表 +func (l *StartListLogic) StartList(in *pcmCore.ApplyListReq) (*pcmCore.ApplyListResp, error) { + result := pcmCore.ApplyListResp{ + InfoList: make([]*pcmCore.ApplyInfo, 0), + } + l.svcCtx.DbEngin.Raw("SELECT sppi.`name` as ParticipantName, c.ns_id as namespace,c.name as name , c.kind as kind FROM cloud c,sc_participant_phy_info sppi where c.`status` = 'Paused' and sppi.id = c.participant_id").Scan(&result.InfoList) + if len(result.InfoList) != 0 { + l.svcCtx.DbEngin.Exec("update cloud set status = ? where status = ?", "Issued", "Paused") + } + return &result, nil +} diff --git a/rpc/internal/server/participantservice/participantserviceserver.go b/rpc/internal/server/participantservice/participantserviceserver.go index 30d31c90e..08f99cf64 100644 --- a/rpc/internal/server/participantservice/participantserviceserver.go +++ b/rpc/internal/server/participantservice/participantserviceserver.go @@ -87,3 +87,15 @@ func (s *ParticipantServiceServer) RestartList(ctx context.Context, in *pcmCore. l := participantservicelogic.NewRestartListLogic(ctx, s.svcCtx) return l.RestartList(in) } + +// PauseList 暂停任务列表 +func (s *ParticipantServiceServer) PauseList(ctx context.Context, in *pcmCore.ApplyListReq) (*pcmCore.ApplyListResp, error) { + l := participantservicelogic.NewPauseListLogic(ctx, s.svcCtx) + return l.PauseList(in) +} + +// StartList 暂停任务列表 +func (s *ParticipantServiceServer) StartList(ctx context.Context, in *pcmCore.ApplyListReq) (*pcmCore.ApplyListResp, error) { + l := participantservicelogic.NewStartListLogic(ctx, s.svcCtx) + return l.StartList(in) +} diff --git a/rpc/pb/pcmCore.proto b/rpc/pb/pcmCore.proto index 6e937374d..42c549366 100644 --- a/rpc/pb/pcmCore.proto +++ b/rpc/pb/pcmCore.proto @@ -335,4 +335,10 @@ service participantService { // RestartList 重启任务列表 rpc restartList(ApplyListReq) returns (ApplyListResp) {}; + + // PauseList 暂停任务列表 + rpc pauseList(ApplyListReq) returns (ApplyListResp) {}; + + // StartList 启动任务列表 + rpc startList(ApplyListReq) returns (ApplyListResp) {}; } \ No newline at end of file diff --git a/rpc/pcmCore/pcmCore.pb.go b/rpc/pcmCore/pcmCore.pb.go index 93249f7f5..e7ef7d125 100644 --- a/rpc/pcmCore/pcmCore.pb.go +++ b/rpc/pcmCore/pcmCore.pb.go @@ -3073,7 +3073,7 @@ var file_pb_pcmCore_proto_rawDesc = []byte{ 0x52, 0x65, 0x73, 0x70, 0x12, 0x37, 0x0a, 0x08, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, - 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x32, 0xb9, 0x06, + 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x32, 0xb5, 0x07, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x50, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x63, @@ -3125,8 +3125,16 @@ var file_pb_pcmCore_proto_rawDesc = []byte{ 0x74, 0x61, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x70, 0x63, - 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x61, 0x75, + 0x73, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, + 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, + 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, + 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x70, 0x63, + 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2f, 0x70, 0x63, 0x6d, 0x43, 0x6f, 0x72, + 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3206,21 +3214,25 @@ var file_pb_pcmCore_proto_depIdxs = []int32{ 27, // 27: pcmCore.participantService.applyList:input_type -> pcmCore.ApplyListReq 27, // 28: pcmCore.participantService.deleteList:input_type -> pcmCore.ApplyListReq 27, // 29: pcmCore.participantService.restartList:input_type -> pcmCore.ApplyListReq - 6, // 30: pcmCore.pcmCore.SyncInfo:output_type -> pcmCore.SyncInfoResp - 8, // 31: pcmCore.pcmCore.InfoList:output_type -> pcmCore.InfoListResp - 12, // 32: pcmCore.participantService.registerParticipant:output_type -> pcmCore.ParticipantPhyResp - 11, // 33: pcmCore.participantService.reportHeartbeat:output_type -> pcmCore.HealthCheckResp - 21, // 34: pcmCore.participantService.reportAvailable:output_type -> pcmCore.ParticipantResp - 22, // 35: pcmCore.participantService.listParticipant:output_type -> pcmCore.ParticipantServiceResp - 20, // 36: pcmCore.participantService.listPhyAvailable:output_type -> pcmCore.ListParticipantAvailResp - 13, // 37: pcmCore.participantService.listPhyInformation:output_type -> pcmCore.ListParticipantPhyResp - 25, // 38: pcmCore.participantService.registerTenant:output_type -> pcmCore.TenantResp - 26, // 39: pcmCore.participantService.listTenant:output_type -> pcmCore.ListTenantResp - 28, // 40: pcmCore.participantService.applyList:output_type -> pcmCore.ApplyListResp - 28, // 41: pcmCore.participantService.deleteList:output_type -> pcmCore.ApplyListResp - 28, // 42: pcmCore.participantService.restartList:output_type -> pcmCore.ApplyListResp - 30, // [30:43] is the sub-list for method output_type - 17, // [17:30] is the sub-list for method input_type + 27, // 30: pcmCore.participantService.pauseList:input_type -> pcmCore.ApplyListReq + 27, // 31: pcmCore.participantService.startList:input_type -> pcmCore.ApplyListReq + 6, // 32: pcmCore.pcmCore.SyncInfo:output_type -> pcmCore.SyncInfoResp + 8, // 33: pcmCore.pcmCore.InfoList:output_type -> pcmCore.InfoListResp + 12, // 34: pcmCore.participantService.registerParticipant:output_type -> pcmCore.ParticipantPhyResp + 11, // 35: pcmCore.participantService.reportHeartbeat:output_type -> pcmCore.HealthCheckResp + 21, // 36: pcmCore.participantService.reportAvailable:output_type -> pcmCore.ParticipantResp + 22, // 37: pcmCore.participantService.listParticipant:output_type -> pcmCore.ParticipantServiceResp + 20, // 38: pcmCore.participantService.listPhyAvailable:output_type -> pcmCore.ListParticipantAvailResp + 13, // 39: pcmCore.participantService.listPhyInformation:output_type -> pcmCore.ListParticipantPhyResp + 25, // 40: pcmCore.participantService.registerTenant:output_type -> pcmCore.TenantResp + 26, // 41: pcmCore.participantService.listTenant:output_type -> pcmCore.ListTenantResp + 28, // 42: pcmCore.participantService.applyList:output_type -> pcmCore.ApplyListResp + 28, // 43: pcmCore.participantService.deleteList:output_type -> pcmCore.ApplyListResp + 28, // 44: pcmCore.participantService.restartList:output_type -> pcmCore.ApplyListResp + 28, // 45: pcmCore.participantService.pauseList:output_type -> pcmCore.ApplyListResp + 28, // 46: pcmCore.participantService.startList:output_type -> pcmCore.ApplyListResp + 32, // [32:47] is the sub-list for method output_type + 17, // [17:32] is the sub-list for method input_type 17, // [17:17] is the sub-list for extension type_name 17, // [17:17] is the sub-list for extension extendee 0, // [0:17] is the sub-list for field type_name diff --git a/rpc/pcmCore/pcmCore_grpc.pb.go b/rpc/pcmCore/pcmCore_grpc.pb.go index 7cb1e45b3..63a41a559 100644 --- a/rpc/pcmCore/pcmCore_grpc.pb.go +++ b/rpc/pcmCore/pcmCore_grpc.pb.go @@ -161,6 +161,8 @@ const ( ParticipantService_ApplyList_FullMethodName = "/pcmCore.participantService/applyList" ParticipantService_DeleteList_FullMethodName = "/pcmCore.participantService/deleteList" ParticipantService_RestartList_FullMethodName = "/pcmCore.participantService/restartList" + ParticipantService_PauseList_FullMethodName = "/pcmCore.participantService/pauseList" + ParticipantService_StartList_FullMethodName = "/pcmCore.participantService/startList" ) // ParticipantServiceClient is the client API for ParticipantService service. @@ -189,6 +191,10 @@ type ParticipantServiceClient interface { DeleteList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) // RestartList 重启任务列表 RestartList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) + // PauseList 暂停任务列表 + PauseList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) + // StartList 暂停任务列表 + StartList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) } type participantServiceClient struct { @@ -298,6 +304,24 @@ func (c *participantServiceClient) RestartList(ctx context.Context, in *ApplyLis return out, nil } +func (c *participantServiceClient) PauseList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) { + out := new(ApplyListResp) + err := c.cc.Invoke(ctx, ParticipantService_PauseList_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *participantServiceClient) StartList(ctx context.Context, in *ApplyListReq, opts ...grpc.CallOption) (*ApplyListResp, error) { + out := new(ApplyListResp) + err := c.cc.Invoke(ctx, ParticipantService_StartList_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ParticipantServiceServer is the server API for ParticipantService service. // All implementations must embed UnimplementedParticipantServiceServer // for forward compatibility @@ -324,6 +348,10 @@ type ParticipantServiceServer interface { DeleteList(context.Context, *ApplyListReq) (*ApplyListResp, error) // RestartList 重启任务列表 RestartList(context.Context, *ApplyListReq) (*ApplyListResp, error) + // PauseList 暂停任务列表 + PauseList(context.Context, *ApplyListReq) (*ApplyListResp, error) + // StartList 暂停任务列表 + StartList(context.Context, *ApplyListReq) (*ApplyListResp, error) mustEmbedUnimplementedParticipantServiceServer() } @@ -364,6 +392,12 @@ func (UnimplementedParticipantServiceServer) DeleteList(context.Context, *ApplyL func (UnimplementedParticipantServiceServer) RestartList(context.Context, *ApplyListReq) (*ApplyListResp, error) { return nil, status.Errorf(codes.Unimplemented, "method RestartList not implemented") } +func (UnimplementedParticipantServiceServer) PauseList(context.Context, *ApplyListReq) (*ApplyListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method PauseList not implemented") +} +func (UnimplementedParticipantServiceServer) StartList(context.Context, *ApplyListReq) (*ApplyListResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartList not implemented") +} func (UnimplementedParticipantServiceServer) mustEmbedUnimplementedParticipantServiceServer() {} // UnsafeParticipantServiceServer may be embedded to opt out of forward compatibility for this service. @@ -575,6 +609,42 @@ func _ParticipantService_RestartList_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _ParticipantService_PauseList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplyListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ParticipantServiceServer).PauseList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ParticipantService_PauseList_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ParticipantServiceServer).PauseList(ctx, req.(*ApplyListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ParticipantService_StartList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplyListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ParticipantServiceServer).StartList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ParticipantService_StartList_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ParticipantServiceServer).StartList(ctx, req.(*ApplyListReq)) + } + return interceptor(ctx, in, info, handler) +} + // ParticipantService_ServiceDesc is the grpc.ServiceDesc for ParticipantService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -626,6 +696,14 @@ var ParticipantService_ServiceDesc = grpc.ServiceDesc{ MethodName: "restartList", Handler: _ParticipantService_RestartList_Handler, }, + { + MethodName: "pauseList", + Handler: _ParticipantService_PauseList_Handler, + }, + { + MethodName: "startList", + Handler: _ParticipantService_StartList_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "pb/pcmCore.proto",