forked from JointCloud/pcm-hpc
67 lines
2.1 KiB
Go
67 lines
2.1 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// Source: slurm.proto
|
|
|
|
package slurmclient
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitlink.org.cn/jcce-pcm/pcm-participant-slurm/slurm"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
AllocatedNodes = slurm.AllocatedNodes
|
|
Cores = slurm.Cores
|
|
Cpus = slurm.Cpus
|
|
Environment = slurm.Environment
|
|
Error = slurm.Error
|
|
GetJobReq = slurm.GetJobReq
|
|
GetJobResp = slurm.GetJobResp
|
|
JobProperties = slurm.JobProperties
|
|
JobResources = slurm.JobResources
|
|
JobResponseProperties = slurm.JobResponseProperties
|
|
JobUpdate = slurm.JobUpdate
|
|
Jobs = slurm.Jobs
|
|
ListJobReq = slurm.ListJobReq
|
|
ListJobResp = slurm.ListJobResp
|
|
Sockets = slurm.Sockets
|
|
SubmitJobReq = slurm.SubmitJobReq
|
|
SubmitJobResp = slurm.SubmitJobResp
|
|
UpdateJobReq = slurm.UpdateJobReq
|
|
UpdateJobResp = slurm.UpdateJobResp
|
|
|
|
Slurm interface {
|
|
SubmitJob(ctx context.Context, in *SubmitJobReq, opts ...grpc.CallOption) (*SubmitJobResp, error)
|
|
ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error)
|
|
GetJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error)
|
|
}
|
|
|
|
defaultSlurm struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewSlurm(cli zrpc.Client) Slurm {
|
|
return &defaultSlurm{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
func (m *defaultSlurm) SubmitJob(ctx context.Context, in *SubmitJobReq, opts ...grpc.CallOption) (*SubmitJobResp, error) {
|
|
client := slurm.NewSlurmClient(m.cli.Conn())
|
|
return client.SubmitJob(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSlurm) ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) {
|
|
client := slurm.NewSlurmClient(m.cli.Conn())
|
|
return client.ListJob(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultSlurm) GetJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) {
|
|
client := slurm.NewSlurmClient(m.cli.Conn())
|
|
return client.GetJob(ctx, in, opts...)
|
|
}
|