PCM/app/slurm/slurmTianhe/rpc/slurmTianhe/slurmTianhe_grpc.pb.go

108 lines
3.8 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.8
// source: slurmTianhe.proto
package slurmTianhe
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// SlurmTianheClient is the client API for SlurmTianhe service.
//
// 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
ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error)
}
type slurmTianheClient struct {
cc grpc.ClientConnInterface
}
func NewSlurmTianheClient(cc grpc.ClientConnInterface) SlurmTianheClient {
return &slurmTianheClient{cc}
}
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...)
if err != nil {
return nil, err
}
return out, nil
}
// SlurmTianheServer is the server API for SlurmTianhe service.
// All implementations must embed UnimplementedSlurmTianheServer
// for forward compatibility
type SlurmTianheServer interface {
// ListHistoryJob list all jobs from slurmdb
ListHistoryJob(context.Context, *ListHistoryJobReq) (*ListHistoryJobResp, error)
mustEmbedUnimplementedSlurmTianheServer()
}
// UnimplementedSlurmTianheServer must be embedded to have forward compatible implementations.
type UnimplementedSlurmTianheServer struct {
}
func (UnimplementedSlurmTianheServer) ListHistoryJob(context.Context, *ListHistoryJobReq) (*ListHistoryJobResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListHistoryJob not implemented")
}
func (UnimplementedSlurmTianheServer) mustEmbedUnimplementedSlurmTianheServer() {}
// UnsafeSlurmTianheServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SlurmTianheServer will
// result in compilation errors.
type UnsafeSlurmTianheServer interface {
mustEmbedUnimplementedSlurmTianheServer()
}
func RegisterSlurmTianheServer(s grpc.ServiceRegistrar, srv SlurmTianheServer) {
s.RegisterService(&SlurmTianhe_ServiceDesc, srv)
}
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 {
return nil, err
}
if interceptor == nil {
return srv.(SlurmTianheServer).ListHistoryJob(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/slurmTianhe.slurmTianhe/ListHistoryJob",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SlurmTianheServer).ListHistoryJob(ctx, req.(*ListHistoryJobReq))
}
return interceptor(ctx, in, info, handler)
}
// SlurmTianhe_ServiceDesc is the grpc.ServiceDesc for SlurmTianhe service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SlurmTianhe_ServiceDesc = grpc.ServiceDesc{
ServiceName: "slurmTianhe.slurmTianhe",
HandlerType: (*SlurmTianheServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListHistoryJob",
Handler: _SlurmTianhe_ListHistoryJob_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "slurmTianhe.proto",
}