pcm-coordinator/rpc/internal/server/participantservice/participantserviceserver.go

102 lines
4.0 KiB
Go

// Code generated by goctl. DO NOT EDIT.
// Source: pcmCore.proto
package server
import (
"context"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/internal/logic/participantservice"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/internal/svc"
"gitlink.org.cn/jcce-pcm/pcm-coordinator/rpc/pcmCore"
)
type ParticipantServiceServer struct {
svcCtx *svc.ServiceContext
pcmCore.UnimplementedParticipantServiceServer
}
func NewParticipantServiceServer(svcCtx *svc.ServiceContext) *ParticipantServiceServer {
return &ParticipantServiceServer{
svcCtx: svcCtx,
}
}
// registerParticipant Participant注册接口
func (s *ParticipantServiceServer) RegisterParticipant(ctx context.Context, in *pcmCore.ParticipantPhyReq) (*pcmCore.ParticipantPhyResp, error) {
l := participantservicelogic.NewRegisterParticipantLogic(ctx, s.svcCtx)
return l.RegisterParticipant(in)
}
// reportHeartbeat 心跳请求
func (s *ParticipantServiceServer) ReportHeartbeat(ctx context.Context, in *pcmCore.ParticipantHeartbeatReq) (*pcmCore.HealthCheckResp, error) {
l := participantservicelogic.NewReportHeartbeatLogic(ctx, s.svcCtx)
return l.ReportHeartbeat(in)
}
// reportAvailable 监控数据上报
func (s *ParticipantServiceServer) ReportAvailable(ctx context.Context, in *pcmCore.ParticipantAvailReq) (*pcmCore.ParticipantResp, error) {
l := participantservicelogic.NewReportAvailableLogic(ctx, s.svcCtx)
return l.ReportAvailable(in)
}
// listParticipant 服务列表
func (s *ParticipantServiceServer) ListParticipant(ctx context.Context, in *pcmCore.ParticipantTenant) (*pcmCore.ParticipantServiceResp, error) {
l := participantservicelogic.NewListParticipantLogic(ctx, s.svcCtx)
return l.ListParticipant(in)
}
// listAvailable 集群动态信息列表
func (s *ParticipantServiceServer) ListPhyAvailable(ctx context.Context, in *pcmCore.ParticipantTenant) (*pcmCore.ListParticipantAvailResp, error) {
l := participantservicelogic.NewListPhyAvailableLogic(ctx, s.svcCtx)
return l.ListPhyAvailable(in)
}
// listPhyInformation 集群静态信息列表
func (s *ParticipantServiceServer) ListPhyInformation(ctx context.Context, in *pcmCore.ParticipantTenant) (*pcmCore.ListParticipantPhyResp, error) {
l := participantservicelogic.NewListPhyInformationLogic(ctx, s.svcCtx)
return l.ListPhyInformation(in)
}
// registerTenant 注册租户信息
func (s *ParticipantServiceServer) RegisterTenant(ctx context.Context, in *pcmCore.TenantInfo) (*pcmCore.TenantResp, error) {
l := participantservicelogic.NewRegisterTenantLogic(ctx, s.svcCtx)
return l.RegisterTenant(in)
}
// listTenant 租户列表信息
func (s *ParticipantServiceServer) ListTenant(ctx context.Context, in *pcmCore.TenantInfo) (*pcmCore.ListTenantResp, error) {
l := participantservicelogic.NewListTenantLogic(ctx, s.svcCtx)
return l.ListTenant(in)
}
// applyList 执行任务列表
func (s *ParticipantServiceServer) ApplyList(ctx context.Context, in *pcmCore.ApplyListReq) (*pcmCore.ApplyListResp, error) {
l := participantservicelogic.NewApplyListLogic(ctx, s.svcCtx)
return l.ApplyList(in)
}
// DeleteList 删除任务列表
func (s *ParticipantServiceServer) DeleteList(ctx context.Context, in *pcmCore.ApplyListReq) (*pcmCore.ApplyListResp, error) {
l := participantservicelogic.NewDeleteListLogic(ctx, s.svcCtx)
return l.DeleteList(in)
}
// RestartList 重启任务列表
func (s *ParticipantServiceServer) RestartList(ctx context.Context, in *pcmCore.ApplyListReq) (*pcmCore.ApplyListResp, error) {
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)
}