diff --git a/adaptor/slurm/slurmCore/api/internal/handler/listjobhandler.go b/adaptor/slurm/slurmCore/api/internal/handler/listjobhandler.go new file mode 100644 index 00000000..c77f61bd --- /dev/null +++ b/adaptor/slurm/slurmCore/api/internal/handler/listjobhandler.go @@ -0,0 +1,28 @@ +package handler + +import ( + "net/http" + + "PCM/adaptor/slurm/slurmCore/api/internal/logic" + "PCM/adaptor/slurm/slurmCore/api/internal/svc" + "PCM/adaptor/slurm/slurmCore/api/internal/types" + "github.com/zeromicro/go-zero/rest/httpx" +) + +func listJobHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var req types.ListJobReq + if err := httpx.Parse(r, &req); err != nil { + httpx.ErrorCtx(r.Context(), w, err) + return + } + + l := logic.NewListJobLogic(r.Context(), svcCtx) + resp, err := l.ListJob(&req) + if err != nil { + httpx.ErrorCtx(r.Context(), w, err) + } else { + httpx.OkJsonCtx(r.Context(), w, resp) + } + } +} diff --git a/adaptor/slurm/slurmCore/api/internal/handler/routes.go b/adaptor/slurm/slurmCore/api/internal/handler/routes.go index 2baab76f..b07a436a 100644 --- a/adaptor/slurm/slurmCore/api/internal/handler/routes.go +++ b/adaptor/slurm/slurmCore/api/internal/handler/routes.go @@ -12,6 +12,11 @@ import ( func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ + { + Method: http.MethodGet, + Path: "/listJob", + Handler: listJobHandler(serverCtx), + }, { Method: http.MethodGet, Path: "/listHistoryJob", diff --git a/adaptor/slurm/slurmCore/api/internal/logic/listhistoryjoblogic.go b/adaptor/slurm/slurmCore/api/internal/logic/listhistoryjoblogic.go index bada1621..3064dc94 100644 --- a/adaptor/slurm/slurmCore/api/internal/logic/listhistoryjoblogic.go +++ b/adaptor/slurm/slurmCore/api/internal/logic/listhistoryjoblogic.go @@ -1,7 +1,7 @@ package logic import ( - "PCM/adaptor/slurm/slurmTianhe/rpc/slurmTianhe" + "PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang" "PCM/common/tool" "PCM/common/xerr" "context" @@ -30,13 +30,13 @@ func NewListHistoryJobLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Li func (l *ListHistoryJobLogic) ListHistoryJob(req *types.ListHistoryJobReq) (resp *types.ListHistoryJobResp, err error) { - //shuguangReq := &slurmShuguang.ListHistoryJobReq{} - //err = copier.CopyWithOption(shuguangReq, req, copier.Option{Converters: tool.Converters}) - //listHistoryJobResp, err := l.svcCtx.ShuguangRpc.ListHistoryJob(l.ctx, shuguangReq) + shuguangReq := &slurmShuguang.ListHistoryJobReq{} + err = copier.CopyWithOption(shuguangReq, req, copier.Option{Converters: tool.Converters}) + listHistoryJobResp, err := l.svcCtx.ShuguangRpc.ListHistoryJob(l.ctx, shuguangReq) - tianheReq := &slurmTianhe.ListHistoryJobReq{} - err = copier.CopyWithOption(tianheReq, req, copier.Option{Converters: tool.Converters}) - listHistoryJobResp, err := l.svcCtx.TianheRpc.ListHistoryJob(l.ctx, tianheReq) + //tianheReq := &slurmTianhe.ListHistoryJobReq{} + //err = copier.CopyWithOption(tianheReq, req, copier.Option{Converters: tool.Converters}) + //listHistoryJobResp, err := l.svcCtx.TianheRpc.ListHistoryJob(l.ctx, tianheReq) if err != nil { return nil, errors.Wrapf(xerr.NewErrMsg("Failed to get db job list"), "Failed to get db job list err : %v ,req:%+v", err, req) @@ -52,7 +52,7 @@ func (l *ListHistoryJobLogic) ListHistoryJob(req *types.ListHistoryJobReq) (resp return nil, err } for i := range resp.HistoryJobs { - resp.HistoryJobs[i].SlurmVersion = "tianhe" + resp.HistoryJobs[i].SlurmVersion = "shuguang" } return resp, nil diff --git a/adaptor/slurm/slurmCore/api/internal/logic/listjoblogic.go b/adaptor/slurm/slurmCore/api/internal/logic/listjoblogic.go new file mode 100644 index 00000000..76b7b2ef --- /dev/null +++ b/adaptor/slurm/slurmCore/api/internal/logic/listjoblogic.go @@ -0,0 +1,61 @@ +package logic + +import ( + "PCM/adaptor/slurm/slurmCore/api/internal/svc" + "PCM/adaptor/slurm/slurmCore/api/internal/types" + "PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang" + "PCM/common/tool" + "context" + "github.com/jinzhu/copier" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListJobLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +func NewListJobLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListJobLogic { + return &ListJobLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *ListJobLogic) ListJob(req *types.ListJobReq) (resp *types.ListJobResp, err error) { + + shuguangReq := &slurmShuguang.ListJobReq{} + err = copier.CopyWithOption(shuguangReq, req, copier.Option{Converters: tool.Converters}) + listJobRespShuguang, err := l.svcCtx.ShuguangRpc.ListJob(l.ctx, shuguangReq) + + resp = &types.ListJobResp{} + + for i := 0; i < len(listJobRespShuguang.Jobs); i++ { + jobShuguang := types.Job{SlurmVersion: "shuguang"} + copier.CopyWithOption(&jobShuguang, &listJobRespShuguang.Jobs[i], copier.Option{Converters: tool.Converters}) + resp.Jobs = append(resp.Jobs, jobShuguang) + } + + //tianheReq := &slurmTianhe.ListJobReq{} + //err = copier.CopyWithOption(tianheReq, req, copier.Option{Converters: tool.Converters}) + //listJobRespTianhe, err := l.svcCtx.TianheRpc.ListJob(l.ctx, tianheReq) + // + //for i := 0; i < len(listJobRespTianhe.Jobs); i++ { + // jobTianhe := types.Job{SlurmVersion: "tianhe"} + // copier.CopyWithOption(&jobTianhe, &listJobRespTianhe, copier.Option{Converters: tool.Converters}) + // resp.Jobs = append(resp.Jobs, jobTianhe) + //} + + //if listJobRespShuguang.Code == 200 && listJobRespTianhe.Code == 200 { + // + //} + + resp.Code = 200 + resp.Msg = "success" + resp.RecordCount = int32(len(resp.Jobs)) + + return resp, nil +} diff --git a/adaptor/slurm/slurmCore/api/internal/types/types.go b/adaptor/slurm/slurmCore/api/internal/types/types.go index 83991f3e..bfd64de1 100644 --- a/adaptor/slurm/slurmCore/api/internal/types/types.go +++ b/adaptor/slurm/slurmCore/api/internal/types/types.go @@ -1,17 +1,99 @@ // Code generated by goctl. DO NOT EDIT. package types -type Domain struct { - DomainName string `json:"domainName"` - SoftStack string `json:"softStack"` - SlurmNum int32 `json:"slurmNum"` - InterfaceCount int32 `json:"interfaceCount"` - RunningJobs int32 `json:"runningJobs"` +type Job struct { + SlurmVersion string `json:"slurmVersion"` + Account string `json:"account"` + AllocNode string `json:"allocNode"` + AllocSid uint32 `json:"allocSid"` + ArrayJobId uint32 `json:"arrayJobId"` + ArrayTaskId uint32 `json:"arrayTaskId"` + AssocId uint32 `json:"assocId"` + BatchFlag uint32 `json:"batchFlag"` + BatchHost string `json:"batchHost"` + BatchScript string `json:"batchScript"` + Command string `json:"command"` + Comment string `json:"comment"` + Contiguous uint32 `json:"contiguous"` + CpusPerTask uint32 `json:"cpusPerTask"` + Dependency string `json:"dependency"` + DerivedEc uint32 `json:"derivedEc"` + EligibleTime int64 `json:"eligibleTime"` + EndTime int64 `json:"endTime"` + ExcNodes string `json:"excNodes"` //NodeUsed in shuguang + ExcNodeInx int32 `json:"excNodeInx"` + ExitCode uint32 `json:"exitCode"` + Features string `json:"features"` + Gres string `json:"gres"` + GroupId uint32 `json:"groupId"` + JobId uint32 `json:"jobId"` //JobId in shuguang + JobState uint32 `json:"jobState"` //JobStatus in shuguang + Licenses string `json:"licenses"` + MaxCpus uint32 `json:"maxCpus"` + MaxNodes uint32 `json:"maxNodes"` + BoardsPerNode uint32 `json:"boardsPerNode"` + SocketsPerBoard uint32 `json:"socketsPerBoard"` + SocketsPerNode uint32 `json:"socketsPerNode"` + CoresPerSocket uint32 `json:"coresPerSocket"` + ThreadsPerCore uint32 `json:"threadsPerCore"` + Name string `json:"name"` //JobName in shuguang + Network string `json:"network"` + Nodes string `json:"nodes"` + Nice uint32 `json:"nice"` + NodeInx int32 `json:"nodeInx"` + NtasksPerCore uint32 `json:"ntasksPerCore"` + NtasksPerNode uint32 `json:"ntasksPerNode"` + NtasksPerSocket uint32 `json:"ntasksPerSocket"` + NtasksPerBoard uint32 `json:"ntasksPerBoard"` + NumNodes uint32 `json:"numNodes"` + NumCpus uint32 `json:"numCpus"` //ProcNumUsed in shuguang + Partition string `json:"partition"` //Queue in shuguang + PnMinMemory uint32 `json:"pnMinMemory"` + PnMinCpus uint32 `json:"pnMinCpus"` + PnMinTmpDisk uint32 `json:"pnMinTmpDisk"` + PreSusTime int64 `json:"preSusTime"` + Priority uint32 `json:"priority"` + Profile uint32 `json:"profile"` + Qos string `json:"qos"` + ReqNodes string `json:"reqNodes"` + ReqNodeInx int32 `json:"reqNodeInx"` + ReqSwitch uint32 `json:"reqSwitch"` + Requeue uint32 `json:"requeue"` + ResizeTime int64 `json:"resizeTime"` + RestartCnt uint32 `json:"restartCnt"` + ResvName string `json:"resvName"` + Shared uint32 `json:"shared"` + ShowFlags uint32 `json:"showFlags"` + StartTime int64 `json:"startTime"` //JobStartTime in shuguang + StateDesc string `json:"stateDesc"` + StateReason uint32 `json:"stateReason"` + SubmitTime int64 `json:"submitTime"` + SuspendTime int64 `json:"suspendTime"` + TimeLimit uint32 `json:"timeLimit"` + TimeMin uint32 `json:"timeMin"` + UserId uint32 `json:"userId"` //User in shuguang + PreemptTime int64 `json:"preemptTime"` + Wait4Switch uint32 `json:"wait4Switch"` + Wckey string `json:"wckey"` + WorkDir string `json:"workDir"` //WorkDir in shuguang + JobRunTime string `json:"jobRunTime"` + JobmanagerId string `json:"jobmanagerId"` + JobmanagerName string `json:"jobmanagerName"` + JobmanagerType string `json:"jobmanagerType"` + ErrorPath string `json:"errorPath"` + OutputPath string `json:"outputPath"` + Reason string `json:"reason"` + AppType string `json:"appType"` } -type DomainSummary struct { - DomainCount int32 `json:"domainCount"` - SoftStackCount int32 `json:"softStackCount"` +type ListJobReq struct { +} + +type ListJobResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + RecordCount int32 `json:"recordCount"` + Jobs []Job `json:"jobs"` } type HistoryJob struct { @@ -66,17 +148,17 @@ type HistoryJob struct { } type ListHistoryJobReq struct { - StartTime string `json:"start_time"` - EndTime string `json:"end_time"` - TimeType string `json:"time_type"` + StartTime string `json:"startTime"` + EndTime string `json:"endTime"` + TimeType string `json:"timeType"` Start int32 `json:"start"` Limit int32 `json:"limit"` - IsQueryByQueueTime int32 `json:"is_query_by_queue_time"` + IsQueryByQueueTime int32 `json:"isQueryByQueueTime"` } type ListHistoryJobResp struct { Code int32 `json:"code"` Msg string `json:"msg"` - RecordCount int32 `json:"record_count"` - HistoryJobs []HistoryJob `json:"history_jobs"` + RecordCount int32 `json:"recordCount"` + HistoryJobs []HistoryJob `json:"historyJobs"` } diff --git a/adaptor/slurm/slurmCore/api/slurmCore.api b/adaptor/slurm/slurmCore/api/slurmCore.api index 851703a4..65a01168 100644 --- a/adaptor/slurm/slurmCore/api/slurmCore.api +++ b/adaptor/slurm/slurmCore/api/slurmCore.api @@ -7,18 +7,104 @@ info( email: "450705171@qq.com" ) -type Domain { - DomainName string `json:"domainName"` - SoftStack string `json:"softStack"` - SlurmNum int32 `json:"slurmNum"` - InterfaceCount int32 `json:"interfaceCount"` - RunningJobs int32 `json:"runningJobs"` +type Job { + SlurmVersion string `json:"slurmVersion"` + Account string `json:"account"` + AllocNode string `json:"allocNode"` + AllocSid uint32 `json:"allocSid"` + ArrayJobId uint32 `json:"arrayJobId"` + ArrayTaskId uint32 `json:"arrayTaskId"` + AssocId uint32 `json:"assocId"` + BatchFlag uint32 `json:"batchFlag"` + BatchHost string `json:"batchHost"` + BatchScript string `json:"batchScript"` + Command string `json:"command"` + Comment string `json:"comment"` + Contiguous uint32 `json:"contiguous"` + CpusPerTask uint32 `json:"cpusPerTask"` + Dependency string `json:"dependency"` + DerivedEc uint32 `json:"derivedEc"` + EligibleTime int64 `json:"eligibleTime"` + EndTime int64 `json:"endTime"` + ExcNodes string `json:"excNodes"` //NodeUsed in shuguang + ExcNodeInx int32 `json:"excNodeInx"` + ExitCode uint32 `json:"exitCode"` + Features string `json:"features"` + Gres string `json:"gres"` + GroupId uint32 `json:"groupId"` + JobId uint32 `json:"jobId"` //JobId in shuguang + JobState uint32 `json:"jobState"` //JobStatus in shuguang + Licenses string `json:"licenses"` + MaxCpus uint32 `json:"maxCpus"` + MaxNodes uint32 `json:"maxNodes"` + BoardsPerNode uint32 `json:"boardsPerNode"` + SocketsPerBoard uint32 `json:"socketsPerBoard"` + SocketsPerNode uint32 `json:"socketsPerNode"` + CoresPerSocket uint32 `json:"coresPerSocket"` + ThreadsPerCore uint32 `json:"threadsPerCore"` + Name string `json:"name"` //JobName in shuguang + Network string `json:"network"` + Nodes string `json:"nodes"` + Nice uint32 `json:"nice"` + NodeInx int32 `json:"nodeInx"` + NtasksPerCore uint32 `json:"ntasksPerCore"` + NtasksPerNode uint32 `json:"ntasksPerNode"` + NtasksPerSocket uint32 `json:"ntasksPerSocket"` + NtasksPerBoard uint32 `json:"ntasksPerBoard"` + NumNodes uint32 `json:"numNodes"` + NumCpus uint32 `json:"numCpus"` //ProcNumUsed in shuguang + Partition string `json:"partition"` //Queue in shuguang + PnMinMemory uint32 `json:"pnMinMemory"` + PnMinCpus uint32 `json:"pnMinCpus"` + PnMinTmpDisk uint32 `json:"pnMinTmpDisk"` + PreSusTime int64 `json:"preSusTime"` + Priority uint32 `json:"priority"` + Profile uint32 `json:"profile"` + Qos string `json:"qos"` + ReqNodes string `json:"reqNodes"` + ReqNodeInx int32 `json:"reqNodeInx"` + ReqSwitch uint32 `json:"reqSwitch"` + Requeue uint32 `json:"requeue"` + ResizeTime int64 `json:"resizeTime"` + RestartCnt uint32 `json:"restartCnt"` + ResvName string `json:"resvName"` + Shared uint32 `json:"shared"` + ShowFlags uint32 `json:"showFlags"` + StartTime int64 `json:"startTime"` //JobStartTime in shuguang + StateDesc string `json:"stateDesc"` + StateReason uint32 `json:"stateReason"` + SubmitTime int64 `json:"submitTime"` + SuspendTime int64 `json:"suspendTime"` + TimeLimit uint32 `json:"timeLimit"` + TimeMin uint32 `json:"timeMin"` + UserId uint32 `json:"userId"` //User in shuguang + PreemptTime int64 `json:"preemptTime"` + Wait4Switch uint32 `json:"wait4Switch"` + Wckey string `json:"wckey"` + WorkDir string `json:"workDir"` //WorkDir in shuguang + + /****shuguang****/ + JobRunTime string `json:"jobRunTime"` + JobmanagerId string `json:"jobmanagerId"` + JobmanagerName string `json:"jobmanagerName"` + JobmanagerType string `json:"jobmanagerType"` + ErrorPath string `json:"errorPath"` + OutputPath string `json:"outputPath"` + Reason string `json:"reason"` + AppType string `json:"appType"` + /****shuguang****/ } -type DomainSummary { - DomainCount int32 `json:"domainCount"` - SoftStackCount int32 `json:"softStackCount"` -} +type ( + listJobReq { + } + listJobResp { + Code int32 `json:"code"` + Msg string `json:"msg"` + RecordCount int32 `json:"recordCount"` + Jobs []Job `json:"jobs"` + } +) type HistoryJob { SlurmVersion string `json:"slurmVersion"` @@ -75,22 +161,26 @@ type HistoryJob { type ( listHistoryJobReq { - StartTime string `json:"start_time"` - EndTime string `json:"end_time"` - TimeType string `json:"time_type"` + StartTime string `json:"startTime"` + EndTime string `json:"endTime"` + TimeType string `json:"timeType"` Start int32 `json:"start"` Limit int32 `json:"limit"` - IsQueryByQueueTime int32 `json:"is_query_by_queue_time"` + IsQueryByQueueTime int32 `json:"isQueryByQueueTime"` } listHistoryJobResp { Code int32 `json:"code"` Msg string `json:"msg"` - RecordCount int32 `json:"record_count"` - HistoryJobs []HistoryJob `json:"history_jobs"` + RecordCount int32 `json:"recordCount"` + HistoryJobs []HistoryJob `json:"historyJobs"` } ) service slurmcore-api { + + @handler listJobHandler + get /listJob (listJobReq) returns (listJobResp) + @handler listHistoryJobHandler get /listHistoryJob (listHistoryJobReq) returns (listHistoryJobResp) } \ No newline at end of file diff --git a/adaptor/slurm/slurmCore/api/slurmcore.go b/adaptor/slurm/slurmCore/api/slurmcore.go index f779330b..eb4ed3d2 100644 --- a/adaptor/slurm/slurmCore/api/slurmcore.go +++ b/adaptor/slurm/slurmCore/api/slurmcore.go @@ -12,7 +12,7 @@ import ( "github.com/zeromicro/go-zero/rest" ) -var configFile = flag.String("f", "etc/slurmcore-api.yaml", "the config file") +var configFile = flag.String("f", "adaptor/slurm/slurmCore/api/etc/slurmcore-api.yaml", "the config file") func main() { flag.Parse() diff --git a/adaptor/slurm/slurmShuguang/rpc/internal/logic/listjoblogic.go b/adaptor/slurm/slurmShuguang/rpc/internal/logic/listjoblogic.go new file mode 100644 index 00000000..227c3d56 --- /dev/null +++ b/adaptor/slurm/slurmShuguang/rpc/internal/logic/listjoblogic.go @@ -0,0 +1,132 @@ +package logic + +import ( + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/util" + "context" + "github.com/bitly/go-simplejson" + "io" + "log" + "net/http" + "net/url" + "strconv" + "time" + + "PCM/adaptor/slurm/slurmShuguang/rpc/internal/svc" + "PCM/adaptor/slurm/slurmShuguang/rpc/slurmShuguang" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListJobLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewListJobLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListJobLogic { + return &ListJobLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// ListJob list all jobs +func (l *ListJobLogic) ListJob(in *slurmShuguang.ListJobReq) (*slurmShuguang.ListJobResp, error) { + + var resp slurmShuguang.ListJobResp + jobUrl := "hpc/openapi/v2/jobs?" + + ClusterId := util.GetClusterId() + Gtoken := util.GetToken() + c := http.Client{Timeout: time.Duration(3) * time.Second} + + params := url.Values{} + params.Add("strClusterIDList", strconv.FormatInt(int64(ClusterId), 10)) + + reqUrl, err := http.NewRequest("GET", "https://api01.hpccube.com:65106/"+jobUrl+params.Encode(), nil) + + if err != nil { + log.Fatal(err) + } + + var token string + if util.GetTokenState(Gtoken) { + token = Gtoken + } else { + token = util.GetToken() + Gtoken = token + } + + reqUrl.Header.Add("token", token) + + respUrl, err := c.Do(reqUrl) + + if err != nil { + log.Fatal(err) + } + + body, err := io.ReadAll(respUrl.Body) + + jsonResult, err := simplejson.NewJson(body) + jsonData := jsonResult.Get("data") + if jsonData.Get("total").MustInt() == 0 { + resp.Code = uint32(200) + resp.Msg = "success" + resp.RecordCount = 0 + return &resp, nil + } + jobList := jsonResult.Get("data").Get("list") + rows, err := jobList.Array() + if err != nil { + log.Fatal(err) + } + defer func(Body io.ReadCloser) { + err := Body.Close() + if err != nil { + + } + }(respUrl.Body) + + var Jobs []*slurmShuguang.Job + + for index := range rows { + jobShuguang := jobList.GetIndex(index) + var job slurmShuguang.Job + + job.AppType = jobShuguang.Get("appType").MustString() + job.ErrorPath = jobShuguang.Get("errorPath").MustString() + job.JobId = jobShuguang.Get("jobId").MustString() + job.JobName = jobShuguang.Get("jobName").MustString() + job.JobRunTime = jobShuguang.Get("jobRunTime").MustString() + job.JobStartTime = jobShuguang.Get("jobStartTime").MustString() + job.JobStatus = jobShuguang.Get("jobState").MustString() + job.JobManagerId = jobShuguang.Get("jobmanagerId").MustString() + job.JobManagerName = jobShuguang.Get("jobmanagerName").MustString() + job.JobManagerType = jobShuguang.Get("jobmanagerType").MustString() + job.NodeUsed = jobShuguang.Get("nodeUsed").MustString() + job.OutputPath = jobShuguang.Get("outputPath").MustString() + job.ProcNumUsed = int32(jobShuguang.Get("procNumUsed").MustInt64()) + job.Queue = jobShuguang.Get("queue").MustString() + job.Reason = jobShuguang.Get("reason").MustString() + job.User = jobShuguang.Get("user").MustString() + job.WorkDir = jobShuguang.Get("workDir").MustString() + + startTime, err := time.Parse(l.svcCtx.Config.ShuguangConf.Layout, jobShuguang.Get("jobStartTime").MustString()) + if err == nil { + job.JobStartTime = startTime.String() + } + + Jobs = append(Jobs, &job) + + } + + if jsonResult.Get("code").MustInt() == 0 { + resp.Code = uint32(200) + } + resp.Msg = jsonResult.Get("msg").MustString() + resp.RecordCount = uint32(jsonData.Get("total").MustInt()) + resp.Jobs = Jobs + + return &resp, nil +} diff --git a/adaptor/slurm/slurmShuguang/rpc/internal/server/slurmshuguangserver.go b/adaptor/slurm/slurmShuguang/rpc/internal/server/slurmshuguangserver.go index d2301704..efc16d31 100644 --- a/adaptor/slurm/slurmShuguang/rpc/internal/server/slurmshuguangserver.go +++ b/adaptor/slurm/slurmShuguang/rpc/internal/server/slurmshuguangserver.go @@ -22,7 +22,13 @@ func NewSlurmShuguangServer(svcCtx *svc.ServiceContext) *SlurmShuguangServer { } } -// ListHistoryJob list all jobs from slurmdb +// ListJob list all jobs +func (s *SlurmShuguangServer) ListJob(ctx context.Context, in *slurmShuguang.ListJobReq) (*slurmShuguang.ListJobResp, error) { + l := logic.NewListJobLogic(ctx, s.svcCtx) + return l.ListJob(in) +} + +// ListHistoryJob list all history jobs func (s *SlurmShuguangServer) ListHistoryJob(ctx context.Context, in *slurmShuguang.ListHistoryJobReq) (*slurmShuguang.ListHistoryJobResp, error) { l := logic.NewListHistoryJobLogic(ctx, s.svcCtx) return l.ListHistoryJob(in) diff --git a/adaptor/slurm/slurmShuguang/rpc/internal/util/shuguangAuth.go b/adaptor/slurm/slurmShuguang/rpc/internal/util/shuguangAuth.go index 787faaec..dddd6e7d 100644 --- a/adaptor/slurm/slurmShuguang/rpc/internal/util/shuguangAuth.go +++ b/adaptor/slurm/slurmShuguang/rpc/internal/util/shuguangAuth.go @@ -69,10 +69,10 @@ type dataToken struct { Token string `json:"token"` } -var configFile = flag.String("flll", "etc/slurmshuguang.yaml", "the config file") +var configFile = flag.String("flll", "adaptor/slurm/slurmShuguang/rpc/etc/slurmshuguang.yaml", "the config file") func GetClusterId() int { - httpClient := http.Client{Timeout: time.Duration(3) * time.Second} + httpClient := http.Client{Timeout: time.Duration(5) * time.Second} var cf config.Config conf.MustLoad(*configFile, &cf) ctx := svc.NewServiceContext(cf) @@ -118,7 +118,7 @@ func GetClusterId() int { } func GetToken() string { - httpClient := http.Client{Timeout: time.Duration(3) * time.Second} + httpClient := http.Client{Timeout: time.Duration(5) * time.Second} var cf config.Config conf.MustLoad(*configFile, &cf) ctx := svc.NewServiceContext(cf) @@ -158,7 +158,7 @@ func GetToken() string { } func GetTokenState(token string) bool { - httpClient := http.Client{Timeout: time.Duration(3) * time.Second} + httpClient := http.Client{Timeout: time.Duration(5) * time.Second} var cf config.Config conf.MustLoad(*configFile, &cf) ctx := svc.NewServiceContext(cf) diff --git a/adaptor/slurm/slurmShuguang/rpc/pb/slurmShuguang.proto b/adaptor/slurm/slurmShuguang/rpc/pb/slurmShuguang.proto index 2af03fc0..cd02242b 100644 --- a/adaptor/slurm/slurmShuguang/rpc/pb/slurmShuguang.proto +++ b/adaptor/slurm/slurmShuguang/rpc/pb/slurmShuguang.proto @@ -4,7 +4,41 @@ package slurmShuguang; option go_package = "/slurmShuguang"; -/******************Job(DB) Start*************************/ + +/******************Job Start*************************/ +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_manager_name = 11; // @gotags: copier:"JobmanagerName" + 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" +} + +message ListJobReq{ +} + +message ListJobResp{ + uint32 code = 1; // @gotags: copier:"Code" + string msg = 2; // @gotags: copier:"Msg" + uint32 record_count = 3; // @gotags: copier:"RecordCount" + repeated job jobs = 4; // @gotags: copier:"Jobs" +} +/******************Job End*************************/ + + +/******************History Job Start*************************/ message historyJob{ string acct_time = 1; // @gotags: copier:"AcctTime" string app_type = 2; // @gotags: copier:"AppType" @@ -39,13 +73,16 @@ message ListHistoryJobResp{ uint32 record_count = 3; // @gotags: copier:"RecordCount" repeated historyJob history_jobs = 4; // @gotags: copier:"HistoryJobs" } -/******************Job(DB) End*************************/ +/******************History Job End*************************/ // Slurm Services for Shuguang Branch service SlurmShuguang { - //ListHistoryJob list all jobs from slurmdb + //ListJob list all jobs + rpc ListJob(ListJobReq) returns (ListJobResp); + + //ListHistoryJob list all history jobs rpc ListHistoryJob(ListHistoryJobReq) returns (ListHistoryJobResp); } \ No newline at end of file diff --git a/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang.pb.go b/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang.pb.go index 9c43224a..70fc8494 100644 --- a/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang.pb.go +++ b/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang.pb.go @@ -20,34 +20,319 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// *****************Job(DB) Start************************ +// *****************Job Start************************ +type Job struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // @gotags: copier:"JobId" + JobName string `protobuf:"bytes,2,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` // @gotags: copier:"Name" + JobStatus string `protobuf:"bytes,3,opt,name=job_status,json=jobStatus,proto3" json:"job_status,omitempty"` // @gotags: copier:"JobState" + Queue string `protobuf:"bytes,4,opt,name=queue,proto3" json:"queue,omitempty"` // @gotags: copier:"Partition" + User string `protobuf:"bytes,5,opt,name=user,proto3" json:"user,omitempty"` // @gotags: copier:"UserId" + NodeUsed string `protobuf:"bytes,6,opt,name=node_used,json=nodeUsed,proto3" json:"node_used,omitempty"` // @gotags: copier:"ExcNodes" + ProcNumUsed int32 `protobuf:"varint,7,opt,name=proc_num_used,json=procNumUsed,proto3" json:"proc_num_used,omitempty"` // @gotags: copier:"NumCpus" + JobStartTime string `protobuf:"bytes,8,opt,name=job_start_time,json=jobStartTime,proto3" json:"job_start_time,omitempty"` // @gotags: copier:"StartTime" + JobRunTime string `protobuf:"bytes,9,opt,name=job_run_time,json=jobRunTime,proto3" json:"job_run_time,omitempty"` // @gotags: copier:"JobRunTime" + JobManagerId string `protobuf:"bytes,10,opt,name=job_manager_id,json=jobManagerId,proto3" json:"job_manager_id,omitempty"` // @gotags: copier:"JobmanagerId" + JobManagerName string `protobuf:"bytes,11,opt,name=job_manager_name,json=jobManagerName,proto3" json:"job_manager_name,omitempty"` // @gotags: copier:"JobmanagerName" + JobManagerType string `protobuf:"bytes,12,opt,name=job_manager_type,json=jobManagerType,proto3" json:"job_manager_type,omitempty"` // @gotags: copier:"JobmanagerType" + ErrorPath string `protobuf:"bytes,13,opt,name=error_path,json=errorPath,proto3" json:"error_path,omitempty"` // @gotags: copier:"ErrorPath" + OutputPath string `protobuf:"bytes,14,opt,name=output_path,json=outputPath,proto3" json:"output_path,omitempty"` // @gotags: copier:"OutputPath" + WorkDir string `protobuf:"bytes,15,opt,name=work_dir,json=workDir,proto3" json:"work_dir,omitempty"` // @gotags: copier:"WorkDir" + Reason string `protobuf:"bytes,16,opt,name=reason,proto3" json:"reason,omitempty"` // @gotags: copier:"Reason" + AppType string `protobuf:"bytes,17,opt,name=app_type,json=appType,proto3" json:"app_type,omitempty"` // @gotags: copier:"AppType" +} + +func (x *Job) Reset() { + *x = Job{} + if protoimpl.UnsafeEnabled { + mi := &file_slurmShuguang_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Job) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Job) ProtoMessage() {} + +func (x *Job) ProtoReflect() protoreflect.Message { + mi := &file_slurmShuguang_proto_msgTypes[0] + 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 Job.ProtoReflect.Descriptor instead. +func (*Job) Descriptor() ([]byte, []int) { + return file_slurmShuguang_proto_rawDescGZIP(), []int{0} +} + +func (x *Job) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *Job) GetJobName() string { + if x != nil { + return x.JobName + } + return "" +} + +func (x *Job) GetJobStatus() string { + if x != nil { + return x.JobStatus + } + return "" +} + +func (x *Job) GetQueue() string { + if x != nil { + return x.Queue + } + return "" +} + +func (x *Job) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *Job) GetNodeUsed() string { + if x != nil { + return x.NodeUsed + } + return "" +} + +func (x *Job) GetProcNumUsed() int32 { + if x != nil { + return x.ProcNumUsed + } + return 0 +} + +func (x *Job) GetJobStartTime() string { + if x != nil { + return x.JobStartTime + } + return "" +} + +func (x *Job) GetJobRunTime() string { + if x != nil { + return x.JobRunTime + } + return "" +} + +func (x *Job) GetJobManagerId() string { + if x != nil { + return x.JobManagerId + } + return "" +} + +func (x *Job) GetJobManagerName() string { + if x != nil { + return x.JobManagerName + } + return "" +} + +func (x *Job) GetJobManagerType() string { + if x != nil { + return x.JobManagerType + } + return "" +} + +func (x *Job) GetErrorPath() string { + if x != nil { + return x.ErrorPath + } + return "" +} + +func (x *Job) GetOutputPath() string { + if x != nil { + return x.OutputPath + } + return "" +} + +func (x *Job) GetWorkDir() string { + if x != nil { + return x.WorkDir + } + return "" +} + +func (x *Job) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *Job) GetAppType() string { + if x != nil { + return x.AppType + } + return "" +} + +type ListJobReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListJobReq) Reset() { + *x = ListJobReq{} + if protoimpl.UnsafeEnabled { + mi := &file_slurmShuguang_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobReq) ProtoMessage() {} + +func (x *ListJobReq) ProtoReflect() protoreflect.Message { + mi := &file_slurmShuguang_proto_msgTypes[1] + 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 ListJobReq.ProtoReflect.Descriptor instead. +func (*ListJobReq) Descriptor() ([]byte, []int) { + return file_slurmShuguang_proto_rawDescGZIP(), []int{1} +} + +type ListJobResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // @gotags: copier:"Code" + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // @gotags: copier:"Msg" + RecordCount uint32 `protobuf:"varint,3,opt,name=record_count,json=recordCount,proto3" json:"record_count,omitempty"` // @gotags: copier:"RecordCount" + Jobs []*Job `protobuf:"bytes,4,rep,name=jobs,proto3" json:"jobs,omitempty"` // @gotags: copier:"Jobs" +} + +func (x *ListJobResp) Reset() { + *x = ListJobResp{} + if protoimpl.UnsafeEnabled { + mi := &file_slurmShuguang_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobResp) ProtoMessage() {} + +func (x *ListJobResp) ProtoReflect() protoreflect.Message { + mi := &file_slurmShuguang_proto_msgTypes[2] + 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 ListJobResp.ProtoReflect.Descriptor instead. +func (*ListJobResp) Descriptor() ([]byte, []int) { + return file_slurmShuguang_proto_rawDescGZIP(), []int{2} +} + +func (x *ListJobResp) GetCode() uint32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ListJobResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *ListJobResp) GetRecordCount() uint32 { + if x != nil { + return x.RecordCount + } + return 0 +} + +func (x *ListJobResp) GetJobs() []*Job { + if x != nil { + return x.Jobs + } + return nil +} + +// *****************History Job Start************************ type HistoryJob struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AcctTime string `protobuf:"bytes,1,opt,name=acct_time,json=acctTime,proto3" json:"acct_time,omitempty" copier:"AcctTime"` // @gotags: copier:"AcctTime" - AppType string `protobuf:"bytes,2,opt,name=app_type,json=appType,proto3" json:"app_type,omitempty" copier:"AppType"` // @gotags: copier:"AppType" - JobEndTime string `protobuf:"bytes,3,opt,name=job_end_time,json=jobEndTime,proto3" json:"job_end_time,omitempty" copier:"End"` // @gotags: copier:"End" - JobExecHost string `protobuf:"bytes,4,opt,name=job_exec_host,json=jobExecHost,proto3" json:"job_exec_host,omitempty" copier:"Nodes"` // @gotags: copier:"Nodes" - JobExitStatus int32 `protobuf:"varint,5,opt,name=job_exit_status,json=jobExitStatus,proto3" json:"job_exit_status,omitempty" copier:"ExitCode"` // @gotags: copier:"ExitCode" - JobId int64 `protobuf:"varint,6,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty" copier:"JobId"` // @gotags: copier:"JobId" - JobName string `protobuf:"bytes,7,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty" copier:"JobName"` // @gotags: copier:"JobName" - JobQueueTime string `protobuf:"bytes,8,opt,name=job_queue_time,json=jobQueueTime,proto3" json:"job_queue_time,omitempty" copier:"JobQueueTime"` // @gotags: copier:"JobQueueTime" - JobStartTime string `protobuf:"bytes,9,opt,name=job_start_time,json=jobStartTime,proto3" json:"job_start_time,omitempty" copier:"Start"` // @gotags: copier:"Start" - JobState string `protobuf:"bytes,10,opt,name=job_state,json=jobState,proto3" json:"job_state,omitempty" copier:"State"` // @gotags: copier:"State" - JobWalltimeUsed string `protobuf:"bytes,11,opt,name=job_walltime_used,json=jobWalltimeUsed,proto3" json:"job_walltime_used,omitempty" copier:"JobWalltimeUsed"` // @gotags: copier:"JobWalltimeUsed" - JobManagerId int64 `protobuf:"varint,12,opt,name=job_manager_id,json=jobManagerId,proto3" json:"job_manager_id,omitempty" copier:"JobManagerId"` // @gotags: copier:"JobManagerId" - NodeCt int32 `protobuf:"varint,13,opt,name=node_ct,json=nodeCt,proto3" json:"node_ct,omitempty" copier:"AllocNodes"` // @gotags: copier:"AllocNodes" - Queue string `protobuf:"bytes,14,opt,name=queue,proto3" json:"queue,omitempty" copier:"Partition"` // @gotags: copier:"Partition" - UserName string `protobuf:"bytes,15,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty" copier:"User"` // @gotags: copier:"User" - Workdir string `protobuf:"bytes,16,opt,name=workdir,proto3" json:"workdir,omitempty" copier:"WorkDir"` // @gotags: copier:"WorkDir" + AcctTime string `protobuf:"bytes,1,opt,name=acct_time,json=acctTime,proto3" json:"acct_time,omitempty"` // @gotags: copier:"AcctTime" + AppType string `protobuf:"bytes,2,opt,name=app_type,json=appType,proto3" json:"app_type,omitempty"` // @gotags: copier:"AppType" + JobEndTime string `protobuf:"bytes,3,opt,name=job_end_time,json=jobEndTime,proto3" json:"job_end_time,omitempty"` // @gotags: copier:"End" + JobExecHost string `protobuf:"bytes,4,opt,name=job_exec_host,json=jobExecHost,proto3" json:"job_exec_host,omitempty"` // @gotags: copier:"Nodes" + JobExitStatus int32 `protobuf:"varint,5,opt,name=job_exit_status,json=jobExitStatus,proto3" json:"job_exit_status,omitempty"` // @gotags: copier:"ExitCode" + JobId int64 `protobuf:"varint,6,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // @gotags: copier:"JobId" + JobName string `protobuf:"bytes,7,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` // @gotags: copier:"JobName" + JobQueueTime string `protobuf:"bytes,8,opt,name=job_queue_time,json=jobQueueTime,proto3" json:"job_queue_time,omitempty"` // @gotags: copier:"JobQueueTime" + JobStartTime string `protobuf:"bytes,9,opt,name=job_start_time,json=jobStartTime,proto3" json:"job_start_time,omitempty"` // @gotags: copier:"Start" + JobState string `protobuf:"bytes,10,opt,name=job_state,json=jobState,proto3" json:"job_state,omitempty"` // @gotags: copier:"State" + JobWalltimeUsed string `protobuf:"bytes,11,opt,name=job_walltime_used,json=jobWalltimeUsed,proto3" json:"job_walltime_used,omitempty"` // @gotags: copier:"JobWalltimeUsed" + JobManagerId int64 `protobuf:"varint,12,opt,name=job_manager_id,json=jobManagerId,proto3" json:"job_manager_id,omitempty"` // @gotags: copier:"JobManagerId" + NodeCt int32 `protobuf:"varint,13,opt,name=node_ct,json=nodeCt,proto3" json:"node_ct,omitempty"` // @gotags: copier:"AllocNodes" + Queue string `protobuf:"bytes,14,opt,name=queue,proto3" json:"queue,omitempty"` // @gotags: copier:"Partition" + UserName string `protobuf:"bytes,15,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` // @gotags: copier:"User" + Workdir string `protobuf:"bytes,16,opt,name=workdir,proto3" json:"workdir,omitempty"` // @gotags: copier:"WorkDir" } func (x *HistoryJob) Reset() { *x = HistoryJob{} if protoimpl.UnsafeEnabled { - mi := &file_slurmShuguang_proto_msgTypes[0] + mi := &file_slurmShuguang_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -60,7 +345,7 @@ func (x *HistoryJob) String() string { func (*HistoryJob) ProtoMessage() {} func (x *HistoryJob) ProtoReflect() protoreflect.Message { - mi := &file_slurmShuguang_proto_msgTypes[0] + mi := &file_slurmShuguang_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -73,7 +358,7 @@ func (x *HistoryJob) ProtoReflect() protoreflect.Message { // Deprecated: Use HistoryJob.ProtoReflect.Descriptor instead. func (*HistoryJob) Descriptor() ([]byte, []int) { - return file_slurmShuguang_proto_rawDescGZIP(), []int{0} + return file_slurmShuguang_proto_rawDescGZIP(), []int{3} } func (x *HistoryJob) GetAcctTime() string { @@ -193,18 +478,18 @@ type ListHistoryJobReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - StartTime string `protobuf:"bytes,1,opt,name=startTime,proto3" json:"startTime,omitempty" copier:"StartTime"` // @gotags: copier:"StartTime" - EndTime string `protobuf:"bytes,2,opt,name=endTime,proto3" json:"endTime,omitempty" copier:"EndTime"` // @gotags: copier:"EndTime" - TimeType string `protobuf:"bytes,3,opt,name=timeType,proto3" json:"timeType,omitempty" copier:"TimeType"` // @gotags: copier:"TimeType" - Start int32 `protobuf:"varint,4,opt,name=start,proto3" json:"start,omitempty" copier:"Start"` // @gotags: copier:"Start" - Limit int32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty" copier:"Limit"` // @gotags: copier:"Limit" - IsQueryByQueueTime int32 `protobuf:"varint,6,opt,name=isQueryByQueueTime,proto3" json:"isQueryByQueueTime,omitempty" copier:"IsQueryByQueueTime"` // @gotags: copier:"IsQueryByQueueTime" + StartTime string `protobuf:"bytes,1,opt,name=startTime,proto3" json:"startTime,omitempty"` // @gotags: copier:"StartTime" + EndTime string `protobuf:"bytes,2,opt,name=endTime,proto3" json:"endTime,omitempty"` // @gotags: copier:"EndTime" + TimeType string `protobuf:"bytes,3,opt,name=timeType,proto3" json:"timeType,omitempty"` // @gotags: copier:"TimeType" + Start int32 `protobuf:"varint,4,opt,name=start,proto3" json:"start,omitempty"` // @gotags: copier:"Start" + Limit int32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` // @gotags: copier:"Limit" + IsQueryByQueueTime int32 `protobuf:"varint,6,opt,name=isQueryByQueueTime,proto3" json:"isQueryByQueueTime,omitempty"` // @gotags: copier:"IsQueryByQueueTime" } func (x *ListHistoryJobReq) Reset() { *x = ListHistoryJobReq{} if protoimpl.UnsafeEnabled { - mi := &file_slurmShuguang_proto_msgTypes[1] + mi := &file_slurmShuguang_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -217,7 +502,7 @@ func (x *ListHistoryJobReq) String() string { func (*ListHistoryJobReq) ProtoMessage() {} func (x *ListHistoryJobReq) ProtoReflect() protoreflect.Message { - mi := &file_slurmShuguang_proto_msgTypes[1] + mi := &file_slurmShuguang_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -230,7 +515,7 @@ func (x *ListHistoryJobReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListHistoryJobReq.ProtoReflect.Descriptor instead. func (*ListHistoryJobReq) Descriptor() ([]byte, []int) { - return file_slurmShuguang_proto_rawDescGZIP(), []int{1} + return file_slurmShuguang_proto_rawDescGZIP(), []int{4} } func (x *ListHistoryJobReq) GetStartTime() string { @@ -280,16 +565,16 @@ type ListHistoryJobResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty" copier:"Code"` // @gotags: copier:"Code" - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty" copier:"Msg"` // @gotags: copier:"Msg" - RecordCount uint32 `protobuf:"varint,3,opt,name=record_count,json=recordCount,proto3" json:"record_count,omitempty" copier:"RecordCount"` // @gotags: copier:"RecordCount" - HistoryJobs []*HistoryJob `protobuf:"bytes,4,rep,name=history_jobs,json=historyJobs,proto3" json:"history_jobs,omitempty" copier:"HistoryJobs"` // @gotags: copier:"HistoryJobs" + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // @gotags: copier:"Code" + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // @gotags: copier:"Msg" + RecordCount uint32 `protobuf:"varint,3,opt,name=record_count,json=recordCount,proto3" json:"record_count,omitempty"` // @gotags: copier:"RecordCount" + HistoryJobs []*HistoryJob `protobuf:"bytes,4,rep,name=history_jobs,json=historyJobs,proto3" json:"history_jobs,omitempty"` // @gotags: copier:"HistoryJobs" } func (x *ListHistoryJobResp) Reset() { *x = ListHistoryJobResp{} if protoimpl.UnsafeEnabled { - mi := &file_slurmShuguang_proto_msgTypes[2] + mi := &file_slurmShuguang_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -302,7 +587,7 @@ func (x *ListHistoryJobResp) String() string { func (*ListHistoryJobResp) ProtoMessage() {} func (x *ListHistoryJobResp) ProtoReflect() protoreflect.Message { - mi := &file_slurmShuguang_proto_msgTypes[2] + mi := &file_slurmShuguang_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -315,7 +600,7 @@ func (x *ListHistoryJobResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListHistoryJobResp.ProtoReflect.Descriptor instead. func (*ListHistoryJobResp) Descriptor() ([]byte, []int) { - return file_slurmShuguang_proto_rawDescGZIP(), []int{2} + return file_slurmShuguang_proto_rawDescGZIP(), []int{5} } func (x *ListHistoryJobResp) GetCode() uint32 { @@ -351,70 +636,116 @@ var File_slurmShuguang_proto protoreflect.FileDescriptor var file_slurmShuguang_proto_rawDesc = []byte{ 0x0a, 0x13, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, - 0x75, 0x61, 0x6e, 0x67, 0x22, 0x85, 0x04, 0x0a, 0x0a, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x4a, 0x6f, 0x62, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6a, - 0x6f, 0x62, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x6a, 0x6f, 0x62, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, - 0x0d, 0x6a, 0x6f, 0x62, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x48, 0x6f, 0x73, - 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6a, 0x6f, 0x62, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6a, 0x6f, 0x62, 0x45, - 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, - 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, - 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6a, - 0x6f, 0x62, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x6f, 0x62, 0x51, 0x75, 0x65, 0x75, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6a, 0x6f, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x6f, 0x62, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x62, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6a, 0x6f, 0x62, 0x5f, 0x77, 0x61, 0x6c, 0x6c, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x6a, 0x6f, 0x62, 0x57, 0x61, 0x6c, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x73, 0x65, 0x64, + 0x75, 0x61, 0x6e, 0x67, 0x22, 0x91, 0x04, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x15, 0x0a, 0x06, + 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, + 0x62, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, + 0x65, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, + 0x55, 0x73, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x63, 0x5f, 0x6e, 0x75, 0x6d, + 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x72, 0x6f, + 0x63, 0x4e, 0x75, 0x6d, 0x55, 0x73, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6a, 0x6f, 0x62, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x6a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0c, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6a, 0x6f, 0x62, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6a, 0x6f, 0x62, 0x4d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x63, - 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x71, 0x75, 0x65, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x64, 0x69, 0x72, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x64, 0x69, 0x72, 0x22, 0xc3, 0x01, 0x0a, - 0x11, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, - 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, - 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, - 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x51, - 0x75, 0x65, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, - 0x69, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x51, 0x75, 0x65, 0x75, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, - 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6a, 0x6f, - 0x62, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x4a, 0x6f, 0x62, 0x52, 0x0b, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x73, - 0x32, 0x66, 0x0a, 0x0d, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, - 0x67, 0x12, 0x55, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x4a, 0x6f, 0x62, 0x12, 0x20, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, - 0x61, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, - 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, - 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x42, 0x10, 0x5a, 0x0e, 0x2f, 0x73, 0x6c, 0x75, - 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x6f, 0x62, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x6a, 0x6f, 0x62, 0x5f, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x6a, 0x6f, 0x62, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x28, 0x0a, 0x10, 0x6a, 0x6f, 0x62, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6a, 0x6f, 0x62, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x77, 0x6f, + 0x72, 0x6b, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x6f, + 0x72, 0x6b, 0x44, 0x69, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x19, 0x0a, + 0x08, 0x61, 0x70, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x22, 0x0c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x22, 0x7e, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x72, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, + 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, 0x6a, 0x6f, 0x62, + 0x52, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x22, 0x85, 0x04, 0x0a, 0x0a, 0x68, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x74, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, + 0x0c, 0x6a, 0x6f, 0x62, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6a, 0x6f, 0x62, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x22, 0x0a, 0x0d, 0x6a, 0x6f, 0x62, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x5f, 0x68, 0x6f, 0x73, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x6f, 0x62, 0x45, 0x78, 0x65, 0x63, 0x48, + 0x6f, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6a, 0x6f, 0x62, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6a, 0x6f, + 0x62, 0x45, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6a, + 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6a, 0x6f, 0x62, + 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, + 0x0e, 0x6a, 0x6f, 0x62, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x6f, 0x62, 0x51, 0x75, 0x65, 0x75, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6a, 0x6f, 0x62, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6a, 0x6f, 0x62, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x62, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, + 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6a, 0x6f, 0x62, 0x5f, 0x77, 0x61, + 0x6c, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x6a, 0x6f, 0x62, 0x57, 0x61, 0x6c, 0x6c, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x73, + 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6a, 0x6f, 0x62, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6a, 0x6f, 0x62, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x63, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x43, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x64, 0x69, 0x72, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x64, 0x69, 0x72, 0x22, 0xc3, + 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x74, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x74, 0x69, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, + 0x79, 0x51, 0x75, 0x65, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x12, 0x69, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x79, 0x51, 0x75, 0x65, 0x75, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, + 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, + 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, 0x68, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x0b, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, + 0x62, 0x73, 0x32, 0xa8, 0x01, 0x0a, 0x0d, 0x53, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, + 0x75, 0x61, 0x6e, 0x67, 0x12, 0x40, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x12, + 0x19, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x20, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x42, 0x10, 0x5a, + 0x0e, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x53, 0x68, 0x75, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -429,21 +760,27 @@ func file_slurmShuguang_proto_rawDescGZIP() []byte { return file_slurmShuguang_proto_rawDescData } -var file_slurmShuguang_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_slurmShuguang_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_slurmShuguang_proto_goTypes = []interface{}{ - (*HistoryJob)(nil), // 0: slurmShuguang.historyJob - (*ListHistoryJobReq)(nil), // 1: slurmShuguang.ListHistoryJobReq - (*ListHistoryJobResp)(nil), // 2: slurmShuguang.ListHistoryJobResp + (*Job)(nil), // 0: slurmShuguang.job + (*ListJobReq)(nil), // 1: slurmShuguang.ListJobReq + (*ListJobResp)(nil), // 2: slurmShuguang.ListJobResp + (*HistoryJob)(nil), // 3: slurmShuguang.historyJob + (*ListHistoryJobReq)(nil), // 4: slurmShuguang.ListHistoryJobReq + (*ListHistoryJobResp)(nil), // 5: slurmShuguang.ListHistoryJobResp } var file_slurmShuguang_proto_depIdxs = []int32{ - 0, // 0: slurmShuguang.ListHistoryJobResp.history_jobs:type_name -> slurmShuguang.historyJob - 1, // 1: slurmShuguang.SlurmShuguang.ListHistoryJob:input_type -> slurmShuguang.ListHistoryJobReq - 2, // 2: slurmShuguang.SlurmShuguang.ListHistoryJob:output_type -> slurmShuguang.ListHistoryJobResp - 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 + 0, // 0: slurmShuguang.ListJobResp.jobs:type_name -> slurmShuguang.job + 3, // 1: slurmShuguang.ListHistoryJobResp.history_jobs:type_name -> slurmShuguang.historyJob + 1, // 2: slurmShuguang.SlurmShuguang.ListJob:input_type -> slurmShuguang.ListJobReq + 4, // 3: slurmShuguang.SlurmShuguang.ListHistoryJob:input_type -> slurmShuguang.ListHistoryJobReq + 2, // 4: slurmShuguang.SlurmShuguang.ListJob:output_type -> slurmShuguang.ListJobResp + 5, // 5: slurmShuguang.SlurmShuguang.ListHistoryJob:output_type -> slurmShuguang.ListHistoryJobResp + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_slurmShuguang_proto_init() } @@ -453,7 +790,7 @@ func file_slurmShuguang_proto_init() { } if !protoimpl.UnsafeEnabled { file_slurmShuguang_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HistoryJob); i { + switch v := v.(*Job); i { case 0: return &v.state case 1: @@ -465,7 +802,7 @@ func file_slurmShuguang_proto_init() { } } file_slurmShuguang_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListHistoryJobReq); i { + switch v := v.(*ListJobReq); i { case 0: return &v.state case 1: @@ -477,6 +814,42 @@ func file_slurmShuguang_proto_init() { } } file_slurmShuguang_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListJobResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slurmShuguang_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HistoryJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slurmShuguang_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHistoryJobReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slurmShuguang_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListHistoryJobResp); i { case 0: return &v.state @@ -495,7 +868,7 @@ func file_slurmShuguang_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_slurmShuguang_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang_grpc.pb.go b/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang_grpc.pb.go index d96abb8e..5be6fdad 100644 --- a/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang_grpc.pb.go +++ b/adaptor/slurm/slurmShuguang/rpc/slurmShuguang/slurmShuguang_grpc.pb.go @@ -22,7 +22,9 @@ 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 SlurmShuguangClient interface { - // ListHistoryJob list all jobs from slurmdb + // ListJob list all jobs + ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) + // ListHistoryJob list all history jobs ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) } @@ -34,6 +36,15 @@ func NewSlurmShuguangClient(cc grpc.ClientConnInterface) SlurmShuguangClient { return &slurmShuguangClient{cc} } +func (c *slurmShuguangClient) ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) { + out := new(ListJobResp) + err := c.cc.Invoke(ctx, "/slurmShuguang.SlurmShuguang/ListJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *slurmShuguangClient) ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) { out := new(ListHistoryJobResp) err := c.cc.Invoke(ctx, "/slurmShuguang.SlurmShuguang/ListHistoryJob", in, out, opts...) @@ -47,7 +58,9 @@ func (c *slurmShuguangClient) ListHistoryJob(ctx context.Context, in *ListHistor // All implementations must embed UnimplementedSlurmShuguangServer // for forward compatibility type SlurmShuguangServer interface { - // ListHistoryJob list all jobs from slurmdb + // ListJob list all jobs + ListJob(context.Context, *ListJobReq) (*ListJobResp, error) + // ListHistoryJob list all history jobs ListHistoryJob(context.Context, *ListHistoryJobReq) (*ListHistoryJobResp, error) mustEmbedUnimplementedSlurmShuguangServer() } @@ -56,6 +69,9 @@ type SlurmShuguangServer interface { type UnimplementedSlurmShuguangServer struct { } +func (UnimplementedSlurmShuguangServer) ListJob(context.Context, *ListJobReq) (*ListJobResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListJob not implemented") +} func (UnimplementedSlurmShuguangServer) ListHistoryJob(context.Context, *ListHistoryJobReq) (*ListHistoryJobResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListHistoryJob not implemented") } @@ -72,6 +88,24 @@ func RegisterSlurmShuguangServer(s grpc.ServiceRegistrar, srv SlurmShuguangServe s.RegisterService(&SlurmShuguang_ServiceDesc, srv) } +func _SlurmShuguang_ListJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListJobReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmShuguangServer).ListJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurmShuguang.SlurmShuguang/ListJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmShuguangServer).ListJob(ctx, req.(*ListJobReq)) + } + return interceptor(ctx, in, info, handler) +} + func _SlurmShuguang_ListHistoryJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListHistoryJobReq) if err := dec(in); err != nil { @@ -97,6 +131,10 @@ var SlurmShuguang_ServiceDesc = grpc.ServiceDesc{ ServiceName: "slurmShuguang.SlurmShuguang", HandlerType: (*SlurmShuguangServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "ListJob", + Handler: _SlurmShuguang_ListJob_Handler, + }, { MethodName: "ListHistoryJob", Handler: _SlurmShuguang_ListHistoryJob_Handler, diff --git a/adaptor/slurm/slurmShuguang/rpc/slurmshuguang.go b/adaptor/slurm/slurmShuguang/rpc/slurmshuguang.go index d5e3cda4..24ac3a00 100644 --- a/adaptor/slurm/slurmShuguang/rpc/slurmshuguang.go +++ b/adaptor/slurm/slurmShuguang/rpc/slurmshuguang.go @@ -16,7 +16,7 @@ import ( "google.golang.org/grpc/reflection" ) -var configFile = flag.String("f", "etc/slurmshuguang.yaml", "the config file") +var configFile = flag.String("f", "adaptor/slurm/slurmShuguang/rpc/etc/slurmshuguang.yaml", "the config file") func main() { flag.Parse() diff --git a/adaptor/slurm/slurmShuguang/rpc/slurmshuguangclient/slurmshuguang.go b/adaptor/slurm/slurmShuguang/rpc/slurmshuguangclient/slurmshuguang.go index 8569a277..c0870f21 100644 --- a/adaptor/slurm/slurmShuguang/rpc/slurmshuguangclient/slurmshuguang.go +++ b/adaptor/slurm/slurmShuguang/rpc/slurmshuguangclient/slurmshuguang.go @@ -14,11 +14,16 @@ import ( type ( HistoryJob = slurmShuguang.HistoryJob + Job = slurmShuguang.Job ListHistoryJobReq = slurmShuguang.ListHistoryJobReq ListHistoryJobResp = slurmShuguang.ListHistoryJobResp + ListJobReq = slurmShuguang.ListJobReq + ListJobResp = slurmShuguang.ListJobResp SlurmShuguang interface { - // ListHistoryJob list all jobs from slurmdb + // ListJob list all jobs + ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) + // ListHistoryJob list all history jobs ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) } @@ -33,7 +38,13 @@ func NewSlurmShuguang(cli zrpc.Client) SlurmShuguang { } } -// ListHistoryJob list all jobs from slurmdb +// ListJob list all jobs +func (m *defaultSlurmShuguang) ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) { + client := slurmShuguang.NewSlurmShuguangClient(m.cli.Conn()) + return client.ListJob(ctx, in, opts...) +} + +// ListHistoryJob list all history jobs func (m *defaultSlurmShuguang) ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) { client := slurmShuguang.NewSlurmShuguangClient(m.cli.Conn()) return client.ListHistoryJob(ctx, in, opts...) diff --git a/adaptor/slurm/slurmTianhe/rpc/internal/logic/listjoblogic.go b/adaptor/slurm/slurmTianhe/rpc/internal/logic/listjoblogic.go new file mode 100644 index 00000000..dd6f30ac --- /dev/null +++ b/adaptor/slurm/slurmTianhe/rpc/internal/logic/listjoblogic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "PCM/adaptor/slurm/slurmTianhe/rpc/internal/svc" + "PCM/adaptor/slurm/slurmTianhe/rpc/slurmTianhe" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ListJobLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewListJobLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListJobLogic { + return &ListJobLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// ListJob list all jobs +func (l *ListJobLogic) ListJob(in *slurmTianhe.ListJobReq) (*slurmTianhe.ListJobResp, error) { + // todo: add your logic here and delete this line + + return &slurmTianhe.ListJobResp{}, nil +} diff --git a/adaptor/slurm/slurmTianhe/rpc/internal/server/slurmtianheserver.go b/adaptor/slurm/slurmTianhe/rpc/internal/server/slurmtianheserver.go index a6208062..f4d90599 100644 --- a/adaptor/slurm/slurmTianhe/rpc/internal/server/slurmtianheserver.go +++ b/adaptor/slurm/slurmTianhe/rpc/internal/server/slurmtianheserver.go @@ -22,7 +22,13 @@ func NewSlurmTianheServer(svcCtx *svc.ServiceContext) *SlurmTianheServer { } } -// ListHistoryJob list all jobs from slurmdb +// ListJob list all jobs +func (s *SlurmTianheServer) ListJob(ctx context.Context, in *slurmTianhe.ListJobReq) (*slurmTianhe.ListJobResp, error) { + l := logic.NewListJobLogic(ctx, s.svcCtx) + return l.ListJob(in) +} + +// ListHistoryJob list all history jobs func (s *SlurmTianheServer) ListHistoryJob(ctx context.Context, in *slurmTianhe.ListHistoryJobReq) (*slurmTianhe.ListHistoryJobResp, error) { l := logic.NewListHistoryJobLogic(ctx, s.svcCtx) return l.ListHistoryJob(in) diff --git a/adaptor/slurm/slurmTianhe/rpc/pb/slurmTianhe.proto b/adaptor/slurm/slurmTianhe/rpc/pb/slurmTianhe.proto index 9162348a..f04a4d65 100644 --- a/adaptor/slurm/slurmTianhe/rpc/pb/slurmTianhe.proto +++ b/adaptor/slurm/slurmTianhe/rpc/pb/slurmTianhe.proto @@ -3,8 +3,96 @@ syntax = "proto3"; package slurmTianhe; option go_package = "/slurmTianhe"; +/******************Job Start*************************/ +message job{ + string account = 1; // @gotags: copier:"Account" + string alloc_node = 2; // @gotags: copier:"AllocNode" + uint32 alloc_sid = 3; // @gotags: copier:"AllocSid" + uint32 array_job_id = 4; // @gotags: copier:"ArrayJobId" + uint32 array_task_id = 5; // @gotags: copier:"ArrayTaskId" + uint32 assoc_id = 6; // @gotags: copier:"AssocId" + uint32 batch_flag = 7; // @gotags: copier:"BatchFlag" + string batch_host = 8; // @gotags: copier:"BatchHost" + string batch_script = 9; // @gotags: copier:"BatchScript" + string command = 10; // @gotags: copier:"Command" + string comment = 11; // @gotags: copier:"Comment" + uint32 contiguous = 12; // @gotags: copier:"Contiguous" + uint32 cpus_per_task = 13; // @gotags: copier:"CpusPerTask" + string dependency = 14; // @gotags: copier:"Dependency" + uint32 derived_ec = 15; // @gotags: copier:"DerivedEc" + int64 eligible_time = 16; // @gotags: copier:"EligibleTime" + int64 end_time = 17; // @gotags: copier:"EndTime" + string exc_nodes = 18; // @gotags: copier:"ExcNodes" + int32 exc_node_inx = 19; // @gotags: copier:"ExcNodeInx" + uint32 exit_code = 20; // @gotags: copier:"ExitCode" + string features = 21; // @gotags: copier:"Features" + string gres = 22; // @gotags: copier:"Gres" + uint32 group_id = 23; // @gotags: copier:"GroupId" + uint32 job_id = 24; // @gotags: copier:"JobId" + uint32 job_state = 25; // @gotags: copier:"JobState" + string licenses = 26; // @gotags: copier:"Licenses" + uint32 max_cpus = 27; // @gotags: copier:"MaxCpus" + uint32 max_nodes = 28; // @gotags: copier:"MaxNodes" + uint32 boards_per_node = 29; // @gotags: copier:"BoardsPerNode" + uint32 sockets_per_board = 30; // @gotags: copier:"SocketsPerBoard" + uint32 sockets_per_node = 31; // @gotags: copier:"SocketsPerNode" + uint32 cores_per_socket = 32; // @gotags: copier:"CoresPerSocket" + uint32 threads_per_core = 33; // @gotags: copier:"ThreadsPerCore" + string name = 34; // @gotags: copier:"Name" + string network = 35; // @gotags: copier:"Network" + string nodes = 36; // @gotags: copier:"Nodes" + uint32 nice = 37; // @gotags: copier:"Nice" + int32 node_inx = 38; // @gotags: copier:"NodeInx" + uint32 ntasks_per_core = 39; // @gotags: copier:"NtasksPerCore" + uint32 ntasks_per_node = 40; // @gotags: copier:"NtasksPerNode" + uint32 ntasks_per_socket = 41; // @gotags: copier:"NtasksPerSocket" + uint32 ntasks_per_board = 42; // @gotags: copier:"NtasksPerBoard" + uint32 num_nodes = 43; // @gotags: copier:"NumNodes" + uint32 num_cpus = 44; // @gotags: copier:"NumCpus" + string partition = 45; // @gotags: copier:"Partition" + uint32 pn_min_memory = 46; // @gotags: copier:"PnMinMemory" + uint32 pn_min_cpus = 47; // @gotags: copier:"PnMinCpus" + uint32 pn_min_tmp_disk = 48; // @gotags: copier:"PnMinTmpDisk" + int64 pre_sus_time = 49; // @gotags: copier:"PreSusTime" + uint32 priority = 50; // @gotags: copier:"Priority" + uint32 profile = 51; // @gotags: copier:"Profile" + string qos = 52; // @gotags: copier:"Qos" + string req_nodes = 53; // @gotags: copier:"ReqNodes" + int32 req_node_inx = 54; // @gotags: copier:"ReqNodeInx" + uint32 req_switch = 55; // @gotags: copier:"ReqSwitch" + uint32 requeue = 56; // @gotags: copier:"Requeue" + int64 resize_time = 57; // @gotags: copier:"ResizeTime" + uint32 restart_cnt = 58; // @gotags: copier:"RestartCnt" + string resv_name = 59; // @gotags: copier:"ResvName" + uint32 shared = 60; // @gotags: copier:"Shared" + uint32 show_flags = 61; // @gotags: copier:"ShowFlags" + int64 start_time = 62; // @gotags: copier:"StartTime" + string state_desc = 63; // @gotags: copier:"StateDesc" + uint32 state_reason = 64; // @gotags: copier:"StateReason" + int64 submit_time = 65; // @gotags: copier:"SubmitTime" + int64 suspend_time = 66; // @gotags: copier:"SuspendTime" + uint32 time_limit = 67; // @gotags: copier:"TimeLimit" + uint32 time_min = 68; // @gotags: copier:"TimeMin" + uint32 user_id = 69; // @gotags: copier:"UserId" + int64 preempt_time = 70; // @gotags: copier:"PreemptTime" + uint32 wait4switch = 71; // @gotags: copier:"Wait4Switch" + string wckey = 72; // @gotags: copier:"Wckey" + string work_dir = 73; // @gotags: copier:"WorkDir" +} -/******************Job(DB) Start*************************/ +message ListJobReq{ +} + +message ListJobResp{ + uint32 code = 1; // @gotags: copier:"Code" + string msg = 2; // @gotags: copier:"Msg" + uint32 record_count = 3; // @gotags: copier:"RecordCount" + repeated job jobs = 4; // @gotags: copier:"Jobs" +} +/******************Job End*************************/ + + +/******************History Job Start*************************/ message historyJob{ uint32 alloc_cpu = 1; // @gotags: copier:"AllocCPU" uint32 alloc_nodes = 2; // @gotags: copier:"AllocNodes" @@ -54,18 +142,21 @@ message ListHistoryJobReq{ 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" repeated historyJob history_jobs = 4; // @gotags: copier:"HistoryJobs" } -/******************Job(DB) End*************************/ +/******************History Job End*************************/ -// Slurm Services for Shuguang Branch +// Slurm Services for Tianhe Branch service slurmTianhe { - //ListHistoryJob list all jobs from slurmdb + //ListJob list all jobs + rpc ListJob(ListJobReq) returns (ListJobResp); + + //ListHistoryJob list all history jobs rpc ListHistoryJob(ListHistoryJobReq) returns (ListHistoryJobResp); } \ No newline at end of file diff --git a/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe.pb.go b/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe.pb.go index 72a11819..ab7f3295 100644 --- a/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe.pb.go +++ b/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.8 +// protoc v3.19.4 // source: slurmTianhe.proto package slurmTianhe @@ -20,7 +20,740 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// *****************Job(DB) Start************************ +// *****************Job Start************************ +type Job struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // @gotags: copier:"Account" + AllocNode string `protobuf:"bytes,2,opt,name=alloc_node,json=allocNode,proto3" json:"alloc_node,omitempty"` // @gotags: copier:"AllocNode" + AllocSid uint32 `protobuf:"varint,3,opt,name=alloc_sid,json=allocSid,proto3" json:"alloc_sid,omitempty"` // @gotags: copier:"AllocSid" + ArrayJobId uint32 `protobuf:"varint,4,opt,name=array_job_id,json=arrayJobId,proto3" json:"array_job_id,omitempty"` // @gotags: copier:"ArrayJobId" + ArrayTaskId uint32 `protobuf:"varint,5,opt,name=array_task_id,json=arrayTaskId,proto3" json:"array_task_id,omitempty"` // @gotags: copier:"ArrayTaskId" + AssocId uint32 `protobuf:"varint,6,opt,name=assoc_id,json=assocId,proto3" json:"assoc_id,omitempty"` // @gotags: copier:"AssocId" + BatchFlag uint32 `protobuf:"varint,7,opt,name=batch_flag,json=batchFlag,proto3" json:"batch_flag,omitempty"` // @gotags: copier:"BatchFlag" + BatchHost string `protobuf:"bytes,8,opt,name=batch_host,json=batchHost,proto3" json:"batch_host,omitempty"` // @gotags: copier:"BatchHost" + BatchScript string `protobuf:"bytes,9,opt,name=batch_script,json=batchScript,proto3" json:"batch_script,omitempty"` // @gotags: copier:"BatchScript" + Command string `protobuf:"bytes,10,opt,name=command,proto3" json:"command,omitempty"` // @gotags: copier:"Command" + Comment string `protobuf:"bytes,11,opt,name=comment,proto3" json:"comment,omitempty"` // @gotags: copier:"Comment" + Contiguous uint32 `protobuf:"varint,12,opt,name=contiguous,proto3" json:"contiguous,omitempty"` // @gotags: copier:"Contiguous" + CpusPerTask uint32 `protobuf:"varint,13,opt,name=cpus_per_task,json=cpusPerTask,proto3" json:"cpus_per_task,omitempty"` // @gotags: copier:"CpusPerTask" + Dependency string `protobuf:"bytes,14,opt,name=dependency,proto3" json:"dependency,omitempty"` // @gotags: copier:"Dependency" + DerivedEc uint32 `protobuf:"varint,15,opt,name=derived_ec,json=derivedEc,proto3" json:"derived_ec,omitempty"` // @gotags: copier:"DerivedEc" + EligibleTime int64 `protobuf:"varint,16,opt,name=eligible_time,json=eligibleTime,proto3" json:"eligible_time,omitempty"` // @gotags: copier:"EligibleTime" + EndTime int64 `protobuf:"varint,17,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // @gotags: copier:"EndTime" + ExcNodes string `protobuf:"bytes,18,opt,name=exc_nodes,json=excNodes,proto3" json:"exc_nodes,omitempty"` // @gotags: copier:"ExcNodes" + ExcNodeInx int32 `protobuf:"varint,19,opt,name=exc_node_inx,json=excNodeInx,proto3" json:"exc_node_inx,omitempty"` // @gotags: copier:"ExcNodeInx" + ExitCode uint32 `protobuf:"varint,20,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` // @gotags: copier:"ExitCode" + Features string `protobuf:"bytes,21,opt,name=features,proto3" json:"features,omitempty"` // @gotags: copier:"Features" + Gres string `protobuf:"bytes,22,opt,name=gres,proto3" json:"gres,omitempty"` // @gotags: copier:"Gres" + GroupId uint32 `protobuf:"varint,23,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // @gotags: copier:"GroupId" + JobId uint32 `protobuf:"varint,24,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // @gotags: copier:"JobId" + JobState uint32 `protobuf:"varint,25,opt,name=job_state,json=jobState,proto3" json:"job_state,omitempty"` // @gotags: copier:"JobState" + Licenses string `protobuf:"bytes,26,opt,name=licenses,proto3" json:"licenses,omitempty"` // @gotags: copier:"Licenses" + MaxCpus uint32 `protobuf:"varint,27,opt,name=max_cpus,json=maxCpus,proto3" json:"max_cpus,omitempty"` // @gotags: copier:"MaxCpus" + MaxNodes uint32 `protobuf:"varint,28,opt,name=max_nodes,json=maxNodes,proto3" json:"max_nodes,omitempty"` // @gotags: copier:"MaxNodes" + BoardsPerNode uint32 `protobuf:"varint,29,opt,name=boards_per_node,json=boardsPerNode,proto3" json:"boards_per_node,omitempty"` // @gotags: copier:"BoardsPerNode" + SocketsPerBoard uint32 `protobuf:"varint,30,opt,name=sockets_per_board,json=socketsPerBoard,proto3" json:"sockets_per_board,omitempty"` // @gotags: copier:"SocketsPerBoard" + SocketsPerNode uint32 `protobuf:"varint,31,opt,name=sockets_per_node,json=socketsPerNode,proto3" json:"sockets_per_node,omitempty"` // @gotags: copier:"SocketsPerNode" + CoresPerSocket uint32 `protobuf:"varint,32,opt,name=cores_per_socket,json=coresPerSocket,proto3" json:"cores_per_socket,omitempty"` // @gotags: copier:"CoresPerSocket" + ThreadsPerCore uint32 `protobuf:"varint,33,opt,name=threads_per_core,json=threadsPerCore,proto3" json:"threads_per_core,omitempty"` // @gotags: copier:"ThreadsPerCore" + Name string `protobuf:"bytes,34,opt,name=name,proto3" json:"name,omitempty"` // @gotags: copier:"Name" + Network string `protobuf:"bytes,35,opt,name=network,proto3" json:"network,omitempty"` // @gotags: copier:"Network" + Nodes string `protobuf:"bytes,36,opt,name=nodes,proto3" json:"nodes,omitempty"` // @gotags: copier:"Nodes" + Nice uint32 `protobuf:"varint,37,opt,name=nice,proto3" json:"nice,omitempty"` // @gotags: copier:"Nice" + NodeInx int32 `protobuf:"varint,38,opt,name=node_inx,json=nodeInx,proto3" json:"node_inx,omitempty"` // @gotags: copier:"NodeInx" + NtasksPerCore uint32 `protobuf:"varint,39,opt,name=ntasks_per_core,json=ntasksPerCore,proto3" json:"ntasks_per_core,omitempty"` // @gotags: copier:"NtasksPerCore" + NtasksPerNode uint32 `protobuf:"varint,40,opt,name=ntasks_per_node,json=ntasksPerNode,proto3" json:"ntasks_per_node,omitempty"` // @gotags: copier:"NtasksPerNode" + NtasksPerSocket uint32 `protobuf:"varint,41,opt,name=ntasks_per_socket,json=ntasksPerSocket,proto3" json:"ntasks_per_socket,omitempty"` // @gotags: copier:"NtasksPerSocket" + NtasksPerBoard uint32 `protobuf:"varint,42,opt,name=ntasks_per_board,json=ntasksPerBoard,proto3" json:"ntasks_per_board,omitempty"` // @gotags: copier:"NtasksPerBoard" + NumNodes uint32 `protobuf:"varint,43,opt,name=num_nodes,json=numNodes,proto3" json:"num_nodes,omitempty"` // @gotags: copier:"NumNodes" + NumCpus uint32 `protobuf:"varint,44,opt,name=num_cpus,json=numCpus,proto3" json:"num_cpus,omitempty"` // @gotags: copier:"NumCpus" + Partition string `protobuf:"bytes,45,opt,name=partition,proto3" json:"partition,omitempty"` // @gotags: copier:"Partition" + PnMinMemory uint32 `protobuf:"varint,46,opt,name=pn_min_memory,json=pnMinMemory,proto3" json:"pn_min_memory,omitempty"` // @gotags: copier:"PnMinMemory" + PnMinCpus uint32 `protobuf:"varint,47,opt,name=pn_min_cpus,json=pnMinCpus,proto3" json:"pn_min_cpus,omitempty"` // @gotags: copier:"PnMinCpus" + PnMinTmpDisk uint32 `protobuf:"varint,48,opt,name=pn_min_tmp_disk,json=pnMinTmpDisk,proto3" json:"pn_min_tmp_disk,omitempty"` // @gotags: copier:"PnMinTmpDisk" + PreSusTime int64 `protobuf:"varint,49,opt,name=pre_sus_time,json=preSusTime,proto3" json:"pre_sus_time,omitempty"` // @gotags: copier:"PreSusTime" + Priority uint32 `protobuf:"varint,50,opt,name=priority,proto3" json:"priority,omitempty"` // @gotags: copier:"Priority" + Profile uint32 `protobuf:"varint,51,opt,name=profile,proto3" json:"profile,omitempty"` // @gotags: copier:"Profile" + Qos string `protobuf:"bytes,52,opt,name=qos,proto3" json:"qos,omitempty"` // @gotags: copier:"Qos" + ReqNodes string `protobuf:"bytes,53,opt,name=req_nodes,json=reqNodes,proto3" json:"req_nodes,omitempty"` // @gotags: copier:"ReqNodes" + ReqNodeInx int32 `protobuf:"varint,54,opt,name=req_node_inx,json=reqNodeInx,proto3" json:"req_node_inx,omitempty"` // @gotags: copier:"ReqNodeInx" + ReqSwitch uint32 `protobuf:"varint,55,opt,name=req_switch,json=reqSwitch,proto3" json:"req_switch,omitempty"` // @gotags: copier:"ReqSwitch" + Requeue uint32 `protobuf:"varint,56,opt,name=requeue,proto3" json:"requeue,omitempty"` // @gotags: copier:"Requeue" + ResizeTime int64 `protobuf:"varint,57,opt,name=resize_time,json=resizeTime,proto3" json:"resize_time,omitempty"` // @gotags: copier:"ResizeTime" + RestartCnt uint32 `protobuf:"varint,58,opt,name=restart_cnt,json=restartCnt,proto3" json:"restart_cnt,omitempty"` // @gotags: copier:"RestartCnt" + ResvName string `protobuf:"bytes,59,opt,name=resv_name,json=resvName,proto3" json:"resv_name,omitempty"` // @gotags: copier:"ResvName" + Shared uint32 `protobuf:"varint,60,opt,name=shared,proto3" json:"shared,omitempty"` // @gotags: copier:"Shared" + ShowFlags uint32 `protobuf:"varint,61,opt,name=show_flags,json=showFlags,proto3" json:"show_flags,omitempty"` // @gotags: copier:"ShowFlags" + StartTime int64 `protobuf:"varint,62,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // @gotags: copier:"StartTime" + StateDesc string `protobuf:"bytes,63,opt,name=state_desc,json=stateDesc,proto3" json:"state_desc,omitempty"` // @gotags: copier:"StateDesc" + StateReason uint32 `protobuf:"varint,64,opt,name=state_reason,json=stateReason,proto3" json:"state_reason,omitempty"` // @gotags: copier:"StateReason" + SubmitTime int64 `protobuf:"varint,65,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` // @gotags: copier:"SubmitTime" + SuspendTime int64 `protobuf:"varint,66,opt,name=suspend_time,json=suspendTime,proto3" json:"suspend_time,omitempty"` // @gotags: copier:"SuspendTime" + TimeLimit uint32 `protobuf:"varint,67,opt,name=time_limit,json=timeLimit,proto3" json:"time_limit,omitempty"` // @gotags: copier:"TimeLimit" + TimeMin uint32 `protobuf:"varint,68,opt,name=time_min,json=timeMin,proto3" json:"time_min,omitempty"` // @gotags: copier:"TimeMin" + UserId uint32 `protobuf:"varint,69,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // @gotags: copier:"UserId" + PreemptTime int64 `protobuf:"varint,70,opt,name=preempt_time,json=preemptTime,proto3" json:"preempt_time,omitempty"` // @gotags: copier:"PreemptTime" + Wait4Switch uint32 `protobuf:"varint,71,opt,name=wait4switch,proto3" json:"wait4switch,omitempty"` // @gotags: copier:"Wait4Switch" + Wckey string `protobuf:"bytes,72,opt,name=wckey,proto3" json:"wckey,omitempty"` // @gotags: copier:"Wckey" + WorkDir string `protobuf:"bytes,73,opt,name=work_dir,json=workDir,proto3" json:"work_dir,omitempty"` // @gotags: copier:"WorkDir" +} + +func (x *Job) Reset() { + *x = Job{} + if protoimpl.UnsafeEnabled { + mi := &file_slurmTianhe_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Job) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Job) ProtoMessage() {} + +func (x *Job) ProtoReflect() protoreflect.Message { + mi := &file_slurmTianhe_proto_msgTypes[0] + 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 Job.ProtoReflect.Descriptor instead. +func (*Job) Descriptor() ([]byte, []int) { + return file_slurmTianhe_proto_rawDescGZIP(), []int{0} +} + +func (x *Job) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *Job) GetAllocNode() string { + if x != nil { + return x.AllocNode + } + return "" +} + +func (x *Job) GetAllocSid() uint32 { + if x != nil { + return x.AllocSid + } + return 0 +} + +func (x *Job) GetArrayJobId() uint32 { + if x != nil { + return x.ArrayJobId + } + return 0 +} + +func (x *Job) GetArrayTaskId() uint32 { + if x != nil { + return x.ArrayTaskId + } + return 0 +} + +func (x *Job) GetAssocId() uint32 { + if x != nil { + return x.AssocId + } + return 0 +} + +func (x *Job) GetBatchFlag() uint32 { + if x != nil { + return x.BatchFlag + } + return 0 +} + +func (x *Job) GetBatchHost() string { + if x != nil { + return x.BatchHost + } + return "" +} + +func (x *Job) GetBatchScript() string { + if x != nil { + return x.BatchScript + } + return "" +} + +func (x *Job) GetCommand() string { + if x != nil { + return x.Command + } + return "" +} + +func (x *Job) GetComment() string { + if x != nil { + return x.Comment + } + return "" +} + +func (x *Job) GetContiguous() uint32 { + if x != nil { + return x.Contiguous + } + return 0 +} + +func (x *Job) GetCpusPerTask() uint32 { + if x != nil { + return x.CpusPerTask + } + return 0 +} + +func (x *Job) GetDependency() string { + if x != nil { + return x.Dependency + } + return "" +} + +func (x *Job) GetDerivedEc() uint32 { + if x != nil { + return x.DerivedEc + } + return 0 +} + +func (x *Job) GetEligibleTime() int64 { + if x != nil { + return x.EligibleTime + } + return 0 +} + +func (x *Job) GetEndTime() int64 { + if x != nil { + return x.EndTime + } + return 0 +} + +func (x *Job) GetExcNodes() string { + if x != nil { + return x.ExcNodes + } + return "" +} + +func (x *Job) GetExcNodeInx() int32 { + if x != nil { + return x.ExcNodeInx + } + return 0 +} + +func (x *Job) GetExitCode() uint32 { + if x != nil { + return x.ExitCode + } + return 0 +} + +func (x *Job) GetFeatures() string { + if x != nil { + return x.Features + } + return "" +} + +func (x *Job) GetGres() string { + if x != nil { + return x.Gres + } + return "" +} + +func (x *Job) GetGroupId() uint32 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *Job) GetJobId() uint32 { + if x != nil { + return x.JobId + } + return 0 +} + +func (x *Job) GetJobState() uint32 { + if x != nil { + return x.JobState + } + return 0 +} + +func (x *Job) GetLicenses() string { + if x != nil { + return x.Licenses + } + return "" +} + +func (x *Job) GetMaxCpus() uint32 { + if x != nil { + return x.MaxCpus + } + return 0 +} + +func (x *Job) GetMaxNodes() uint32 { + if x != nil { + return x.MaxNodes + } + return 0 +} + +func (x *Job) GetBoardsPerNode() uint32 { + if x != nil { + return x.BoardsPerNode + } + return 0 +} + +func (x *Job) GetSocketsPerBoard() uint32 { + if x != nil { + return x.SocketsPerBoard + } + return 0 +} + +func (x *Job) GetSocketsPerNode() uint32 { + if x != nil { + return x.SocketsPerNode + } + return 0 +} + +func (x *Job) GetCoresPerSocket() uint32 { + if x != nil { + return x.CoresPerSocket + } + return 0 +} + +func (x *Job) GetThreadsPerCore() uint32 { + if x != nil { + return x.ThreadsPerCore + } + return 0 +} + +func (x *Job) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Job) GetNetwork() string { + if x != nil { + return x.Network + } + return "" +} + +func (x *Job) GetNodes() string { + if x != nil { + return x.Nodes + } + return "" +} + +func (x *Job) GetNice() uint32 { + if x != nil { + return x.Nice + } + return 0 +} + +func (x *Job) GetNodeInx() int32 { + if x != nil { + return x.NodeInx + } + return 0 +} + +func (x *Job) GetNtasksPerCore() uint32 { + if x != nil { + return x.NtasksPerCore + } + return 0 +} + +func (x *Job) GetNtasksPerNode() uint32 { + if x != nil { + return x.NtasksPerNode + } + return 0 +} + +func (x *Job) GetNtasksPerSocket() uint32 { + if x != nil { + return x.NtasksPerSocket + } + return 0 +} + +func (x *Job) GetNtasksPerBoard() uint32 { + if x != nil { + return x.NtasksPerBoard + } + return 0 +} + +func (x *Job) GetNumNodes() uint32 { + if x != nil { + return x.NumNodes + } + return 0 +} + +func (x *Job) GetNumCpus() uint32 { + if x != nil { + return x.NumCpus + } + return 0 +} + +func (x *Job) GetPartition() string { + if x != nil { + return x.Partition + } + return "" +} + +func (x *Job) GetPnMinMemory() uint32 { + if x != nil { + return x.PnMinMemory + } + return 0 +} + +func (x *Job) GetPnMinCpus() uint32 { + if x != nil { + return x.PnMinCpus + } + return 0 +} + +func (x *Job) GetPnMinTmpDisk() uint32 { + if x != nil { + return x.PnMinTmpDisk + } + return 0 +} + +func (x *Job) GetPreSusTime() int64 { + if x != nil { + return x.PreSusTime + } + return 0 +} + +func (x *Job) GetPriority() uint32 { + if x != nil { + return x.Priority + } + return 0 +} + +func (x *Job) GetProfile() uint32 { + if x != nil { + return x.Profile + } + return 0 +} + +func (x *Job) GetQos() string { + if x != nil { + return x.Qos + } + return "" +} + +func (x *Job) GetReqNodes() string { + if x != nil { + return x.ReqNodes + } + return "" +} + +func (x *Job) GetReqNodeInx() int32 { + if x != nil { + return x.ReqNodeInx + } + return 0 +} + +func (x *Job) GetReqSwitch() uint32 { + if x != nil { + return x.ReqSwitch + } + return 0 +} + +func (x *Job) GetRequeue() uint32 { + if x != nil { + return x.Requeue + } + return 0 +} + +func (x *Job) GetResizeTime() int64 { + if x != nil { + return x.ResizeTime + } + return 0 +} + +func (x *Job) GetRestartCnt() uint32 { + if x != nil { + return x.RestartCnt + } + return 0 +} + +func (x *Job) GetResvName() string { + if x != nil { + return x.ResvName + } + return "" +} + +func (x *Job) GetShared() uint32 { + if x != nil { + return x.Shared + } + return 0 +} + +func (x *Job) GetShowFlags() uint32 { + if x != nil { + return x.ShowFlags + } + return 0 +} + +func (x *Job) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *Job) GetStateDesc() string { + if x != nil { + return x.StateDesc + } + return "" +} + +func (x *Job) GetStateReason() uint32 { + if x != nil { + return x.StateReason + } + return 0 +} + +func (x *Job) GetSubmitTime() int64 { + if x != nil { + return x.SubmitTime + } + return 0 +} + +func (x *Job) GetSuspendTime() int64 { + if x != nil { + return x.SuspendTime + } + return 0 +} + +func (x *Job) GetTimeLimit() uint32 { + if x != nil { + return x.TimeLimit + } + return 0 +} + +func (x *Job) GetTimeMin() uint32 { + if x != nil { + return x.TimeMin + } + return 0 +} + +func (x *Job) GetUserId() uint32 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *Job) GetPreemptTime() int64 { + if x != nil { + return x.PreemptTime + } + return 0 +} + +func (x *Job) GetWait4Switch() uint32 { + if x != nil { + return x.Wait4Switch + } + return 0 +} + +func (x *Job) GetWckey() string { + if x != nil { + return x.Wckey + } + return "" +} + +func (x *Job) GetWorkDir() string { + if x != nil { + return x.WorkDir + } + return "" +} + +type ListJobReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListJobReq) Reset() { + *x = ListJobReq{} + if protoimpl.UnsafeEnabled { + mi := &file_slurmTianhe_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobReq) ProtoMessage() {} + +func (x *ListJobReq) ProtoReflect() protoreflect.Message { + mi := &file_slurmTianhe_proto_msgTypes[1] + 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 ListJobReq.ProtoReflect.Descriptor instead. +func (*ListJobReq) Descriptor() ([]byte, []int) { + return file_slurmTianhe_proto_rawDescGZIP(), []int{1} +} + +type ListJobResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // @gotags: copier:"Code" + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // @gotags: copier:"Msg" + RecordCount uint32 `protobuf:"varint,3,opt,name=record_count,json=recordCount,proto3" json:"record_count,omitempty"` // @gotags: copier:"RecordCount" + Jobs []*Job `protobuf:"bytes,4,rep,name=jobs,proto3" json:"jobs,omitempty"` // @gotags: copier:"Jobs" +} + +func (x *ListJobResp) Reset() { + *x = ListJobResp{} + if protoimpl.UnsafeEnabled { + mi := &file_slurmTianhe_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListJobResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListJobResp) ProtoMessage() {} + +func (x *ListJobResp) ProtoReflect() protoreflect.Message { + mi := &file_slurmTianhe_proto_msgTypes[2] + 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 ListJobResp.ProtoReflect.Descriptor instead. +func (*ListJobResp) Descriptor() ([]byte, []int) { + return file_slurmTianhe_proto_rawDescGZIP(), []int{2} +} + +func (x *ListJobResp) GetCode() uint32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ListJobResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *ListJobResp) GetRecordCount() uint32 { + if x != nil { + return x.RecordCount + } + return 0 +} + +func (x *ListJobResp) GetJobs() []*Job { + if x != nil { + return x.Jobs + } + return nil +} + +// *****************History Job Start************************ type HistoryJob struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -72,7 +805,7 @@ type HistoryJob struct { func (x *HistoryJob) Reset() { *x = HistoryJob{} if protoimpl.UnsafeEnabled { - mi := &file_slurmTianhe_proto_msgTypes[0] + mi := &file_slurmTianhe_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -85,7 +818,7 @@ func (x *HistoryJob) String() string { func (*HistoryJob) ProtoMessage() {} func (x *HistoryJob) ProtoReflect() protoreflect.Message { - mi := &file_slurmTianhe_proto_msgTypes[0] + mi := &file_slurmTianhe_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -98,7 +831,7 @@ func (x *HistoryJob) ProtoReflect() protoreflect.Message { // Deprecated: Use HistoryJob.ProtoReflect.Descriptor instead. func (*HistoryJob) Descriptor() ([]byte, []int) { - return file_slurmTianhe_proto_rawDescGZIP(), []int{0} + return file_slurmTianhe_proto_rawDescGZIP(), []int{3} } func (x *HistoryJob) GetAllocCpu() uint32 { @@ -397,7 +1130,7 @@ type ListHistoryJobReq struct { func (x *ListHistoryJobReq) Reset() { *x = ListHistoryJobReq{} if protoimpl.UnsafeEnabled { - mi := &file_slurmTianhe_proto_msgTypes[1] + mi := &file_slurmTianhe_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -410,7 +1143,7 @@ func (x *ListHistoryJobReq) String() string { func (*ListHistoryJobReq) ProtoMessage() {} func (x *ListHistoryJobReq) ProtoReflect() protoreflect.Message { - mi := &file_slurmTianhe_proto_msgTypes[1] + mi := &file_slurmTianhe_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -423,7 +1156,7 @@ func (x *ListHistoryJobReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListHistoryJobReq.ProtoReflect.Descriptor instead. func (*ListHistoryJobReq) Descriptor() ([]byte, []int) { - return file_slurmTianhe_proto_rawDescGZIP(), []int{1} + return file_slurmTianhe_proto_rawDescGZIP(), []int{4} } type ListHistoryJobResp struct { @@ -440,7 +1173,7 @@ type ListHistoryJobResp struct { func (x *ListHistoryJobResp) Reset() { *x = ListHistoryJobResp{} if protoimpl.UnsafeEnabled { - mi := &file_slurmTianhe_proto_msgTypes[2] + mi := &file_slurmTianhe_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -453,7 +1186,7 @@ func (x *ListHistoryJobResp) String() string { func (*ListHistoryJobResp) ProtoMessage() {} func (x *ListHistoryJobResp) ProtoReflect() protoreflect.Message { - mi := &file_slurmTianhe_proto_msgTypes[2] + mi := &file_slurmTianhe_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -466,7 +1199,7 @@ func (x *ListHistoryJobResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListHistoryJobResp.ProtoReflect.Descriptor instead. func (*ListHistoryJobResp) Descriptor() ([]byte, []int) { - return file_slurmTianhe_proto_rawDescGZIP(), []int{2} + return file_slurmTianhe_proto_rawDescGZIP(), []int{5} } func (x *ListHistoryJobResp) GetCode() uint32 { @@ -502,94 +1235,249 @@ var File_slurmTianhe_proto protoreflect.FileDescriptor var file_slurmTianhe_proto_rawDesc = []byte{ 0x0a, 0x11, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, - 0x22, 0xd0, 0x08, 0x0a, 0x0a, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x12, - 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x5f, 0x63, 0x70, 0x75, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x43, 0x70, 0x75, 0x12, 0x1f, 0x0a, 0x0b, - 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x73, 0x73, 0x6f, 0x63, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, - 0x5f, 0x65, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x65, 0x72, 0x69, 0x76, - 0x65, 0x64, 0x45, 0x63, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x5f, - 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, - 0x64, 0x45, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x65, - 0x78, 0x69, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x65, - 0x78, 0x69, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6a, 0x6f, 0x62, - 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x69, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x6a, 0x6f, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x66, 0x74, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6c, 0x66, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x64, - 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x13, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x71, - 0x6f, 0x73, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x71, 0x6f, 0x73, 0x69, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x71, 0x43, 0x70, 0x75, 0x73, 0x12, 0x17, 0x0a, 0x07, - 0x72, 0x65, 0x71, 0x5f, 0x6d, 0x65, 0x6d, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, - 0x65, 0x71, 0x4d, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x71, 0x75, 0x69, 0x64, 0x18, - 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x65, 0x71, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x76, 0x69, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x76, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x66, 0x75, - 0x6c, 0x6c, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x68, 0x6f, 0x77, 0x46, 0x75, - 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, - 0x64, 0x65, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x75, 0x73, 0x70, 0x65, - 0x6e, 0x64, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x5f, 0x63, 0x70, 0x75, 0x5f, - 0x73, 0x65, 0x63, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x79, 0x73, 0x43, 0x70, - 0x75, 0x53, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x79, 0x73, 0x5f, 0x63, 0x70, 0x75, 0x5f, - 0x75, 0x73, 0x65, 0x63, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x43, - 0x70, 0x75, 0x55, 0x73, 0x65, 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x5f, 0x63, 0x70, 0x75, 0x5f, - 0x73, 0x65, 0x63, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x43, 0x70, - 0x75, 0x53, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x5f, 0x63, 0x70, 0x75, 0x5f, - 0x75, 0x73, 0x65, 0x63, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x43, - 0x70, 0x75, 0x55, 0x73, 0x65, 0x63, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, - 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x72, 0x61, - 0x63, 0x6b, 0x53, 0x74, 0x65, 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x24, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x20, 0x0a, - 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x26, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x43, 0x70, 0x75, 0x53, 0x65, 0x63, 0x12, - 0x22, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, 0x65, 0x63, - 0x18, 0x27, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x43, 0x70, 0x75, 0x55, - 0x73, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x18, 0x28, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x63, 0x6b, - 0x65, 0x79, 0x69, 0x64, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x77, 0x63, 0x6b, 0x65, - 0x79, 0x69, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x22, 0x99, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, - 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x68, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x2e, 0x68, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x0b, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x4a, 0x6f, 0x62, 0x73, 0x32, 0x60, 0x0a, 0x0b, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, - 0x6e, 0x68, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, - 0x6e, 0x68, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, - 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, - 0x6e, 0x68, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, - 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0e, 0x5a, 0x0c, 0x2f, 0x73, 0x6c, 0x75, 0x72, 0x6d, - 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0xd5, 0x11, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x5f, 0x73, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x53, 0x69, 0x64, 0x12, 0x20, + 0x0a, 0x0c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x61, 0x72, 0x72, 0x61, 0x79, 0x4a, 0x6f, 0x62, 0x49, 0x64, + 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x61, 0x72, 0x72, 0x61, 0x79, 0x54, 0x61, + 0x73, 0x6b, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x67, 0x75, 0x6f, + 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x67, + 0x75, 0x6f, 0x75, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x63, 0x70, 0x75, 0x73, 0x5f, 0x70, 0x65, 0x72, + 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x70, 0x75, + 0x73, 0x50, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x65, 0x64, 0x5f, 0x65, 0x63, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x64, 0x65, + 0x72, 0x69, 0x76, 0x65, 0x64, 0x45, 0x63, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6c, 0x69, 0x67, 0x69, + 0x62, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, + 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, + 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x5f, 0x6e, + 0x6f, 0x64, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x4e, + 0x6f, 0x64, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x65, 0x78, 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x69, 0x6e, 0x78, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x65, 0x78, 0x63, 0x4e, + 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x67, 0x72, 0x65, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x67, + 0x72, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, + 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x15, + 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x62, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x1a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x19, + 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x07, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, + 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6d, 0x61, + 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, + 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0d, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, + 0x0a, 0x11, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x73, 0x50, 0x65, 0x72, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x1f, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, + 0x63, 0x6f, 0x72, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x28, + 0x0a, 0x10, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, + 0x72, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, + 0x73, 0x50, 0x65, 0x72, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, + 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x69, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x65, + 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x78, 0x18, 0x26, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x27, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x50, 0x65, 0x72, 0x43, + 0x6f, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, 0x70, 0x65, + 0x72, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6e, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x50, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x18, 0x29, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x6e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x50, 0x65, + 0x72, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x18, 0x2a, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0e, 0x6e, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x50, 0x65, 0x72, 0x42, 0x6f, 0x61, 0x72, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x2b, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x19, + 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x43, 0x70, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x6e, 0x5f, 0x6d, 0x69, + 0x6e, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x2e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, + 0x70, 0x6e, 0x4d, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1e, 0x0a, 0x0b, 0x70, + 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x09, 0x70, 0x6e, 0x4d, 0x69, 0x6e, 0x43, 0x70, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x0f, 0x70, + 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x6d, 0x70, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x30, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x6e, 0x4d, 0x69, 0x6e, 0x54, 0x6d, 0x70, 0x44, 0x69, + 0x73, 0x6b, 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x73, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x31, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x53, 0x75, 0x73, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x32, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x33, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x6f, + 0x73, 0x18, 0x34, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x71, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x72, 0x65, 0x71, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x35, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x72, 0x65, 0x71, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x65, 0x71, + 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x78, 0x18, 0x36, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x72, 0x65, 0x71, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x72, + 0x65, 0x71, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x37, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x09, 0x72, 0x65, 0x71, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x38, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x39, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x69, 0x7a, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x63, 0x6e, 0x74, 0x18, 0x3a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x43, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x76, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x3b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x76, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x18, 0x3c, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x68, 0x6f, 0x77, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x3d, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x09, 0x73, 0x68, 0x6f, 0x77, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x3e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x18, 0x3f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x44, 0x65, 0x73, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x40, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x41, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x42, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0b, 0x73, 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x43, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x44, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x69, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x45, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x46, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x65, 0x6d, 0x70, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x77, 0x61, 0x69, 0x74, 0x34, 0x73, 0x77, + 0x69, 0x74, 0x63, 0x68, 0x18, 0x47, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x77, 0x61, 0x69, 0x74, + 0x34, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x63, 0x6b, 0x65, 0x79, + 0x18, 0x48, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x19, 0x0a, + 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x49, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x77, 0x6f, 0x72, 0x6b, 0x44, 0x69, 0x72, 0x22, 0x0c, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x22, 0x7c, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, + 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x72, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, + 0x0a, 0x04, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x2e, 0x6a, 0x6f, 0x62, 0x52, 0x04, + 0x6a, 0x6f, 0x62, 0x73, 0x22, 0xd0, 0x08, 0x0a, 0x0a, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4a, 0x6f, 0x62, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x5f, 0x63, 0x70, 0x75, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x43, 0x70, 0x75, + 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x4e, 0x6f, 0x64, 0x65, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x72, + 0x69, 0x76, 0x65, 0x64, 0x5f, 0x65, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x64, + 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x45, 0x63, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x72, 0x69, + 0x76, 0x65, 0x64, 0x5f, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, + 0x72, 0x69, 0x76, 0x65, 0x64, 0x45, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x61, 0x70, 0x73, + 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x65, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x69, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x67, + 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x6a, 0x6f, 0x62, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6a, 0x6f, + 0x62, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6a, 0x6f, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x6c, 0x66, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6c, 0x66, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, + 0x64, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x71, 0x6f, 0x73, 0x69, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x71, 0x6f, 0x73, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x5f, 0x63, 0x70, 0x75, + 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x71, 0x43, 0x70, 0x75, 0x73, + 0x12, 0x17, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x5f, 0x6d, 0x65, 0x6d, 0x18, 0x16, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x06, 0x72, 0x65, 0x71, 0x4d, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x64, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x76, 0x69, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x06, 0x72, 0x65, 0x73, 0x76, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x68, 0x6f, + 0x77, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x68, + 0x6f, 0x77, 0x46, 0x75, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x1a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x18, 0x1c, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, + 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, + 0x75, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x5f, + 0x63, 0x70, 0x75, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, + 0x79, 0x73, 0x43, 0x70, 0x75, 0x53, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x79, 0x73, 0x5f, + 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, + 0x73, 0x79, 0x73, 0x43, 0x70, 0x75, 0x55, 0x73, 0x65, 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x5f, + 0x63, 0x70, 0x75, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, + 0x6f, 0x74, 0x43, 0x70, 0x75, 0x53, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x5f, + 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, + 0x74, 0x6f, 0x74, 0x43, 0x70, 0x75, 0x55, 0x73, 0x65, 0x63, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, + 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0a, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x53, 0x74, 0x65, 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x12, 0x20, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x73, 0x65, + 0x63, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x43, 0x70, 0x75, + 0x53, 0x65, 0x63, 0x12, 0x22, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x70, 0x75, 0x5f, + 0x75, 0x73, 0x65, 0x63, 0x18, 0x27, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, + 0x43, 0x70, 0x75, 0x55, 0x73, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x63, 0x6b, 0x65, 0x79, + 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, + 0x07, 0x77, 0x63, 0x6b, 0x65, 0x79, 0x69, 0x64, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, + 0x77, 0x63, 0x6b, 0x65, 0x79, 0x69, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x22, 0x99, 0x01, 0x0a, + 0x12, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, + 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0c, + 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6a, 0x6f, 0x62, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, + 0x2e, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x0b, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x73, 0x32, 0x9e, 0x01, 0x0a, 0x0b, 0x73, 0x6c, 0x75, + 0x72, 0x6d, 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, + 0x4a, 0x6f, 0x62, 0x12, 0x17, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, 0x6e, 0x68, + 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x73, + 0x6c, 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4a, + 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x73, 0x6c, 0x75, 0x72, 0x6d, + 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0e, 0x5a, 0x0c, 0x2f, 0x73, 0x6c, + 0x75, 0x72, 0x6d, 0x54, 0x69, 0x61, 0x6e, 0x68, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -604,21 +1492,27 @@ func file_slurmTianhe_proto_rawDescGZIP() []byte { return file_slurmTianhe_proto_rawDescData } -var file_slurmTianhe_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_slurmTianhe_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_slurmTianhe_proto_goTypes = []interface{}{ - (*HistoryJob)(nil), // 0: slurmTianhe.historyJob - (*ListHistoryJobReq)(nil), // 1: slurmTianhe.ListHistoryJobReq - (*ListHistoryJobResp)(nil), // 2: slurmTianhe.ListHistoryJobResp + (*Job)(nil), // 0: slurmTianhe.job + (*ListJobReq)(nil), // 1: slurmTianhe.ListJobReq + (*ListJobResp)(nil), // 2: slurmTianhe.ListJobResp + (*HistoryJob)(nil), // 3: slurmTianhe.historyJob + (*ListHistoryJobReq)(nil), // 4: slurmTianhe.ListHistoryJobReq + (*ListHistoryJobResp)(nil), // 5: slurmTianhe.ListHistoryJobResp } var file_slurmTianhe_proto_depIdxs = []int32{ - 0, // 0: slurmTianhe.ListHistoryJobResp.history_jobs:type_name -> slurmTianhe.historyJob - 1, // 1: slurmTianhe.slurmTianhe.ListHistoryJob:input_type -> slurmTianhe.ListHistoryJobReq - 2, // 2: slurmTianhe.slurmTianhe.ListHistoryJob:output_type -> slurmTianhe.ListHistoryJobResp - 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 + 0, // 0: slurmTianhe.ListJobResp.jobs:type_name -> slurmTianhe.job + 3, // 1: slurmTianhe.ListHistoryJobResp.history_jobs:type_name -> slurmTianhe.historyJob + 1, // 2: slurmTianhe.slurmTianhe.ListJob:input_type -> slurmTianhe.ListJobReq + 4, // 3: slurmTianhe.slurmTianhe.ListHistoryJob:input_type -> slurmTianhe.ListHistoryJobReq + 2, // 4: slurmTianhe.slurmTianhe.ListJob:output_type -> slurmTianhe.ListJobResp + 5, // 5: slurmTianhe.slurmTianhe.ListHistoryJob:output_type -> slurmTianhe.ListHistoryJobResp + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_slurmTianhe_proto_init() } @@ -628,7 +1522,7 @@ func file_slurmTianhe_proto_init() { } if !protoimpl.UnsafeEnabled { file_slurmTianhe_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HistoryJob); i { + switch v := v.(*Job); i { case 0: return &v.state case 1: @@ -640,7 +1534,7 @@ func file_slurmTianhe_proto_init() { } } file_slurmTianhe_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListHistoryJobReq); i { + switch v := v.(*ListJobReq); i { case 0: return &v.state case 1: @@ -652,6 +1546,42 @@ func file_slurmTianhe_proto_init() { } } file_slurmTianhe_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListJobResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slurmTianhe_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HistoryJob); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slurmTianhe_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHistoryJobReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_slurmTianhe_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListHistoryJobResp); i { case 0: return &v.state @@ -670,7 +1600,7 @@ func file_slurmTianhe_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_slurmTianhe_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe_grpc.pb.go b/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe_grpc.pb.go index 2d7d2b82..b71c0709 100644 --- a/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe_grpc.pb.go +++ b/adaptor/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.8 +// - protoc v3.19.4 // source: slurmTianhe.proto package slurmTianhe @@ -22,7 +22,9 @@ 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 SlurmTianheClient interface { - // ListHistoryJob list all jobs from slurmdb + // ListJob list all jobs + ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) + // ListHistoryJob list all history jobs ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) } @@ -34,6 +36,15 @@ func NewSlurmTianheClient(cc grpc.ClientConnInterface) SlurmTianheClient { return &slurmTianheClient{cc} } +func (c *slurmTianheClient) ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) { + out := new(ListJobResp) + err := c.cc.Invoke(ctx, "/slurmTianhe.slurmTianhe/ListJob", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *slurmTianheClient) ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) { out := new(ListHistoryJobResp) err := c.cc.Invoke(ctx, "/slurmTianhe.slurmTianhe/ListHistoryJob", in, out, opts...) @@ -47,7 +58,9 @@ func (c *slurmTianheClient) ListHistoryJob(ctx context.Context, in *ListHistoryJ // All implementations must embed UnimplementedSlurmTianheServer // for forward compatibility type SlurmTianheServer interface { - // ListHistoryJob list all jobs from slurmdb + // ListJob list all jobs + ListJob(context.Context, *ListJobReq) (*ListJobResp, error) + // ListHistoryJob list all history jobs ListHistoryJob(context.Context, *ListHistoryJobReq) (*ListHistoryJobResp, error) mustEmbedUnimplementedSlurmTianheServer() } @@ -56,6 +69,9 @@ type SlurmTianheServer interface { type UnimplementedSlurmTianheServer struct { } +func (UnimplementedSlurmTianheServer) ListJob(context.Context, *ListJobReq) (*ListJobResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListJob not implemented") +} func (UnimplementedSlurmTianheServer) ListHistoryJob(context.Context, *ListHistoryJobReq) (*ListHistoryJobResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListHistoryJob not implemented") } @@ -72,6 +88,24 @@ func RegisterSlurmTianheServer(s grpc.ServiceRegistrar, srv SlurmTianheServer) { s.RegisterService(&SlurmTianhe_ServiceDesc, srv) } +func _SlurmTianhe_ListJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListJobReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SlurmTianheServer).ListJob(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/slurmTianhe.slurmTianhe/ListJob", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SlurmTianheServer).ListJob(ctx, req.(*ListJobReq)) + } + return interceptor(ctx, in, info, handler) +} + func _SlurmTianhe_ListHistoryJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListHistoryJobReq) if err := dec(in); err != nil { @@ -97,6 +131,10 @@ var SlurmTianhe_ServiceDesc = grpc.ServiceDesc{ ServiceName: "slurmTianhe.slurmTianhe", HandlerType: (*SlurmTianheServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "ListJob", + Handler: _SlurmTianhe_ListJob_Handler, + }, { MethodName: "ListHistoryJob", Handler: _SlurmTianhe_ListHistoryJob_Handler, diff --git a/adaptor/slurm/slurmTianhe/rpc/slurmtianhe.go b/adaptor/slurm/slurmTianhe/rpc/slurmtianhe.go index ee855ebb..f8a0df70 100644 --- a/adaptor/slurm/slurmTianhe/rpc/slurmtianhe.go +++ b/adaptor/slurm/slurmTianhe/rpc/slurmtianhe.go @@ -16,7 +16,7 @@ import ( "google.golang.org/grpc/reflection" ) -var configFile = flag.String("f", "etc/slurmtianhe.yaml", "the config file") +var configFile = flag.String("f", "adaptor/slurm/slurmTianhe/rpc/etc/slurmtianhe.yaml", "the config file") func main() { flag.Parse() diff --git a/adaptor/slurm/slurmTianhe/rpc/slurmtianheclient/slurmtianhe.go b/adaptor/slurm/slurmTianhe/rpc/slurmtianheclient/slurmtianhe.go index 39bea8a5..f0884982 100644 --- a/adaptor/slurm/slurmTianhe/rpc/slurmtianheclient/slurmtianhe.go +++ b/adaptor/slurm/slurmTianhe/rpc/slurmtianheclient/slurmtianhe.go @@ -14,11 +14,16 @@ import ( type ( HistoryJob = slurmTianhe.HistoryJob + Job = slurmTianhe.Job ListHistoryJobReq = slurmTianhe.ListHistoryJobReq ListHistoryJobResp = slurmTianhe.ListHistoryJobResp + ListJobReq = slurmTianhe.ListJobReq + ListJobResp = slurmTianhe.ListJobResp SlurmTianhe interface { - // ListHistoryJob list all jobs from slurmdb + // ListJob list all jobs + ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) + // ListHistoryJob list all history jobs ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) } @@ -33,7 +38,13 @@ func NewSlurmTianhe(cli zrpc.Client) SlurmTianhe { } } -// ListHistoryJob list all jobs from slurmdb +// ListJob list all jobs +func (m *defaultSlurmTianhe) ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) { + client := slurmTianhe.NewSlurmTianheClient(m.cli.Conn()) + return client.ListJob(ctx, in, opts...) +} + +// ListHistoryJob list all history jobs func (m *defaultSlurmTianhe) ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) { client := slurmTianhe.NewSlurmTianheClient(m.cli.Conn()) return client.ListHistoryJob(ctx, in, opts...)