// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.21.12
// source: executor.proto

package pb

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

// ExecutorServiceClient is the client API for ExecutorService 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 ExecutorServiceClient interface {
	/// Processes a batch
	ProcessBatch(ctx context.Context, in *ProcessBatchRequest, opts ...grpc.CallOption) (*ProcessBatchResponse, error)
}

type executorServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewExecutorServiceClient(cc grpc.ClientConnInterface) ExecutorServiceClient {
	return &executorServiceClient{cc}
}

func (c *executorServiceClient) ProcessBatch(ctx context.Context, in *ProcessBatchRequest, opts ...grpc.CallOption) (*ProcessBatchResponse, error) {
	out := new(ProcessBatchResponse)
	err := c.cc.Invoke(ctx, "/executor.v1.ExecutorService/ProcessBatch", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ExecutorServiceServer is the server API for ExecutorService service.
// All implementations must embed UnimplementedExecutorServiceServer
// for forward compatibility
type ExecutorServiceServer interface {
	/// Processes a batch
	ProcessBatch(context.Context, *ProcessBatchRequest) (*ProcessBatchResponse, error)
	mustEmbedUnimplementedExecutorServiceServer()
}

// UnimplementedExecutorServiceServer must be embedded to have forward compatible implementations.
type UnimplementedExecutorServiceServer struct {
}

func (UnimplementedExecutorServiceServer) ProcessBatch(context.Context, *ProcessBatchRequest) (*ProcessBatchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ProcessBatch not implemented")
}
func (UnimplementedExecutorServiceServer) mustEmbedUnimplementedExecutorServiceServer() {}

// UnsafeExecutorServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ExecutorServiceServer will
// result in compilation errors.
type UnsafeExecutorServiceServer interface {
	mustEmbedUnimplementedExecutorServiceServer()
}

func RegisterExecutorServiceServer(s grpc.ServiceRegistrar, srv ExecutorServiceServer) {
	s.RegisterService(&ExecutorService_ServiceDesc, srv)
}

func _ExecutorService_ProcessBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProcessBatchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExecutorServiceServer).ProcessBatch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/executor.v1.ExecutorService/ProcessBatch",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExecutorServiceServer).ProcessBatch(ctx, req.(*ProcessBatchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ExecutorService_ServiceDesc is the grpc.ServiceDesc for ExecutorService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ExecutorService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "executor.v1.ExecutorService",
	HandlerType: (*ExecutorServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ProcessBatch",
			Handler:    _ExecutorService_ProcessBatch_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "executor.proto",
}
