635 lines
25 KiB
Go
635 lines
25 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v3.20.3
|
|
// source: proto/kevo/service.proto
|
|
|
|
package proto
|
|
|
|
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.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
KevoService_Get_FullMethodName = "/kevo.KevoService/Get"
|
|
KevoService_Put_FullMethodName = "/kevo.KevoService/Put"
|
|
KevoService_Delete_FullMethodName = "/kevo.KevoService/Delete"
|
|
KevoService_BatchWrite_FullMethodName = "/kevo.KevoService/BatchWrite"
|
|
KevoService_Scan_FullMethodName = "/kevo.KevoService/Scan"
|
|
KevoService_BeginTransaction_FullMethodName = "/kevo.KevoService/BeginTransaction"
|
|
KevoService_CommitTransaction_FullMethodName = "/kevo.KevoService/CommitTransaction"
|
|
KevoService_RollbackTransaction_FullMethodName = "/kevo.KevoService/RollbackTransaction"
|
|
KevoService_TxGet_FullMethodName = "/kevo.KevoService/TxGet"
|
|
KevoService_TxPut_FullMethodName = "/kevo.KevoService/TxPut"
|
|
KevoService_TxDelete_FullMethodName = "/kevo.KevoService/TxDelete"
|
|
KevoService_TxScan_FullMethodName = "/kevo.KevoService/TxScan"
|
|
KevoService_GetStats_FullMethodName = "/kevo.KevoService/GetStats"
|
|
KevoService_Compact_FullMethodName = "/kevo.KevoService/Compact"
|
|
)
|
|
|
|
// KevoServiceClient is the client API for KevoService 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 KevoServiceClient interface {
|
|
// Key-Value Operations
|
|
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
|
|
Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
|
|
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
|
|
// Batch Operations
|
|
BatchWrite(ctx context.Context, in *BatchWriteRequest, opts ...grpc.CallOption) (*BatchWriteResponse, error)
|
|
// Iterator Operations
|
|
Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ScanResponse], error)
|
|
// Transaction Operations
|
|
BeginTransaction(ctx context.Context, in *BeginTransactionRequest, opts ...grpc.CallOption) (*BeginTransactionResponse, error)
|
|
CommitTransaction(ctx context.Context, in *CommitTransactionRequest, opts ...grpc.CallOption) (*CommitTransactionResponse, error)
|
|
RollbackTransaction(ctx context.Context, in *RollbackTransactionRequest, opts ...grpc.CallOption) (*RollbackTransactionResponse, error)
|
|
// Transaction Operations within an active transaction
|
|
TxGet(ctx context.Context, in *TxGetRequest, opts ...grpc.CallOption) (*TxGetResponse, error)
|
|
TxPut(ctx context.Context, in *TxPutRequest, opts ...grpc.CallOption) (*TxPutResponse, error)
|
|
TxDelete(ctx context.Context, in *TxDeleteRequest, opts ...grpc.CallOption) (*TxDeleteResponse, error)
|
|
TxScan(ctx context.Context, in *TxScanRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TxScanResponse], error)
|
|
// Administrative Operations
|
|
GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
|
|
Compact(ctx context.Context, in *CompactRequest, opts ...grpc.CallOption) (*CompactResponse, error)
|
|
}
|
|
|
|
type kevoServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewKevoServiceClient(cc grpc.ClientConnInterface) KevoServiceClient {
|
|
return &kevoServiceClient{cc}
|
|
}
|
|
|
|
func (c *kevoServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_Get_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(PutResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_Put_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(DeleteResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_Delete_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) BatchWrite(ctx context.Context, in *BatchWriteRequest, opts ...grpc.CallOption) (*BatchWriteResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(BatchWriteResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_BatchWrite_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ScanResponse], error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
stream, err := c.cc.NewStream(ctx, &KevoService_ServiceDesc.Streams[0], KevoService_Scan_FullMethodName, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &grpc.GenericClientStream[ScanRequest, ScanResponse]{ClientStream: stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type KevoService_ScanClient = grpc.ServerStreamingClient[ScanResponse]
|
|
|
|
func (c *kevoServiceClient) BeginTransaction(ctx context.Context, in *BeginTransactionRequest, opts ...grpc.CallOption) (*BeginTransactionResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(BeginTransactionResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_BeginTransaction_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) CommitTransaction(ctx context.Context, in *CommitTransactionRequest, opts ...grpc.CallOption) (*CommitTransactionResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CommitTransactionResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_CommitTransaction_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) RollbackTransaction(ctx context.Context, in *RollbackTransactionRequest, opts ...grpc.CallOption) (*RollbackTransactionResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RollbackTransactionResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_RollbackTransaction_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) TxGet(ctx context.Context, in *TxGetRequest, opts ...grpc.CallOption) (*TxGetResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(TxGetResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_TxGet_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) TxPut(ctx context.Context, in *TxPutRequest, opts ...grpc.CallOption) (*TxPutResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(TxPutResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_TxPut_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) TxDelete(ctx context.Context, in *TxDeleteRequest, opts ...grpc.CallOption) (*TxDeleteResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(TxDeleteResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_TxDelete_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) TxScan(ctx context.Context, in *TxScanRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[TxScanResponse], error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
stream, err := c.cc.NewStream(ctx, &KevoService_ServiceDesc.Streams[1], KevoService_TxScan_FullMethodName, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &grpc.GenericClientStream[TxScanRequest, TxScanResponse]{ClientStream: stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type KevoService_TxScanClient = grpc.ServerStreamingClient[TxScanResponse]
|
|
|
|
func (c *kevoServiceClient) GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(GetStatsResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_GetStats_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *kevoServiceClient) Compact(ctx context.Context, in *CompactRequest, opts ...grpc.CallOption) (*CompactResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CompactResponse)
|
|
err := c.cc.Invoke(ctx, KevoService_Compact_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// KevoServiceServer is the server API for KevoService service.
|
|
// All implementations must embed UnimplementedKevoServiceServer
|
|
// for forward compatibility.
|
|
type KevoServiceServer interface {
|
|
// Key-Value Operations
|
|
Get(context.Context, *GetRequest) (*GetResponse, error)
|
|
Put(context.Context, *PutRequest) (*PutResponse, error)
|
|
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
|
|
// Batch Operations
|
|
BatchWrite(context.Context, *BatchWriteRequest) (*BatchWriteResponse, error)
|
|
// Iterator Operations
|
|
Scan(*ScanRequest, grpc.ServerStreamingServer[ScanResponse]) error
|
|
// Transaction Operations
|
|
BeginTransaction(context.Context, *BeginTransactionRequest) (*BeginTransactionResponse, error)
|
|
CommitTransaction(context.Context, *CommitTransactionRequest) (*CommitTransactionResponse, error)
|
|
RollbackTransaction(context.Context, *RollbackTransactionRequest) (*RollbackTransactionResponse, error)
|
|
// Transaction Operations within an active transaction
|
|
TxGet(context.Context, *TxGetRequest) (*TxGetResponse, error)
|
|
TxPut(context.Context, *TxPutRequest) (*TxPutResponse, error)
|
|
TxDelete(context.Context, *TxDeleteRequest) (*TxDeleteResponse, error)
|
|
TxScan(*TxScanRequest, grpc.ServerStreamingServer[TxScanResponse]) error
|
|
// Administrative Operations
|
|
GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
|
|
Compact(context.Context, *CompactRequest) (*CompactResponse, error)
|
|
mustEmbedUnimplementedKevoServiceServer()
|
|
}
|
|
|
|
// UnimplementedKevoServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedKevoServiceServer struct{}
|
|
|
|
func (UnimplementedKevoServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) Put(context.Context, *PutRequest) (*PutResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Put not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) BatchWrite(context.Context, *BatchWriteRequest) (*BatchWriteResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method BatchWrite not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) Scan(*ScanRequest, grpc.ServerStreamingServer[ScanResponse]) error {
|
|
return status.Errorf(codes.Unimplemented, "method Scan not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) BeginTransaction(context.Context, *BeginTransactionRequest) (*BeginTransactionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method BeginTransaction not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) CommitTransaction(context.Context, *CommitTransactionRequest) (*CommitTransactionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CommitTransaction not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) RollbackTransaction(context.Context, *RollbackTransactionRequest) (*RollbackTransactionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method RollbackTransaction not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) TxGet(context.Context, *TxGetRequest) (*TxGetResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method TxGet not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) TxPut(context.Context, *TxPutRequest) (*TxPutResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method TxPut not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) TxDelete(context.Context, *TxDeleteRequest) (*TxDeleteResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method TxDelete not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) TxScan(*TxScanRequest, grpc.ServerStreamingServer[TxScanResponse]) error {
|
|
return status.Errorf(codes.Unimplemented, "method TxScan not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) Compact(context.Context, *CompactRequest) (*CompactResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Compact not implemented")
|
|
}
|
|
func (UnimplementedKevoServiceServer) mustEmbedUnimplementedKevoServiceServer() {}
|
|
func (UnimplementedKevoServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeKevoServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to KevoServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeKevoServiceServer interface {
|
|
mustEmbedUnimplementedKevoServiceServer()
|
|
}
|
|
|
|
func RegisterKevoServiceServer(s grpc.ServiceRegistrar, srv KevoServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedKevoServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&KevoService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _KevoService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).Get(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_Get_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).Get(ctx, req.(*GetRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PutRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).Put(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_Put_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).Put(ctx, req.(*PutRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).Delete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_Delete_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).Delete(ctx, req.(*DeleteRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_BatchWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(BatchWriteRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).BatchWrite(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_BatchWrite_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).BatchWrite(ctx, req.(*BatchWriteRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_Scan_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(ScanRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(KevoServiceServer).Scan(m, &grpc.GenericServerStream[ScanRequest, ScanResponse]{ServerStream: stream})
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type KevoService_ScanServer = grpc.ServerStreamingServer[ScanResponse]
|
|
|
|
func _KevoService_BeginTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(BeginTransactionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).BeginTransaction(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_BeginTransaction_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).BeginTransaction(ctx, req.(*BeginTransactionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_CommitTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CommitTransactionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).CommitTransaction(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_CommitTransaction_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).CommitTransaction(ctx, req.(*CommitTransactionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_RollbackTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(RollbackTransactionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).RollbackTransaction(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_RollbackTransaction_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).RollbackTransaction(ctx, req.(*RollbackTransactionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_TxGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(TxGetRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).TxGet(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_TxGet_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).TxGet(ctx, req.(*TxGetRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_TxPut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(TxPutRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).TxPut(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_TxPut_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).TxPut(ctx, req.(*TxPutRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_TxDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(TxDeleteRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).TxDelete(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_TxDelete_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).TxDelete(ctx, req.(*TxDeleteRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_TxScan_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(TxScanRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(KevoServiceServer).TxScan(m, &grpc.GenericServerStream[TxScanRequest, TxScanResponse]{ServerStream: stream})
|
|
}
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
type KevoService_TxScanServer = grpc.ServerStreamingServer[TxScanResponse]
|
|
|
|
func _KevoService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetStatsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).GetStats(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_GetStats_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).GetStats(ctx, req.(*GetStatsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _KevoService_Compact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CompactRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(KevoServiceServer).Compact(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: KevoService_Compact_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(KevoServiceServer).Compact(ctx, req.(*CompactRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// KevoService_ServiceDesc is the grpc.ServiceDesc for KevoService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var KevoService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "kevo.KevoService",
|
|
HandlerType: (*KevoServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Get",
|
|
Handler: _KevoService_Get_Handler,
|
|
},
|
|
{
|
|
MethodName: "Put",
|
|
Handler: _KevoService_Put_Handler,
|
|
},
|
|
{
|
|
MethodName: "Delete",
|
|
Handler: _KevoService_Delete_Handler,
|
|
},
|
|
{
|
|
MethodName: "BatchWrite",
|
|
Handler: _KevoService_BatchWrite_Handler,
|
|
},
|
|
{
|
|
MethodName: "BeginTransaction",
|
|
Handler: _KevoService_BeginTransaction_Handler,
|
|
},
|
|
{
|
|
MethodName: "CommitTransaction",
|
|
Handler: _KevoService_CommitTransaction_Handler,
|
|
},
|
|
{
|
|
MethodName: "RollbackTransaction",
|
|
Handler: _KevoService_RollbackTransaction_Handler,
|
|
},
|
|
{
|
|
MethodName: "TxGet",
|
|
Handler: _KevoService_TxGet_Handler,
|
|
},
|
|
{
|
|
MethodName: "TxPut",
|
|
Handler: _KevoService_TxPut_Handler,
|
|
},
|
|
{
|
|
MethodName: "TxDelete",
|
|
Handler: _KevoService_TxDelete_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetStats",
|
|
Handler: _KevoService_GetStats_Handler,
|
|
},
|
|
{
|
|
MethodName: "Compact",
|
|
Handler: _KevoService_Compact_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "Scan",
|
|
Handler: _KevoService_Scan_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
{
|
|
StreamName: "TxScan",
|
|
Handler: _KevoService_TxScan_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
},
|
|
Metadata: "proto/kevo/service.proto",
|
|
}
|