github.com/MetalBlockchain/metalgo@v1.11.9/proto/pb/sharedmemory/sharedmemory_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.3.0
     4  // - protoc             (unknown)
     5  // source: sharedmemory/sharedmemory.proto
     6  
     7  package sharedmemory
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  )
    15  
    16  // This is a compile-time assertion to ensure that this generated file
    17  // is compatible with the grpc package it is being compiled against.
    18  // Requires gRPC-Go v1.32.0 or later.
    19  const _ = grpc.SupportPackageIsVersion7
    20  
    21  const (
    22  	SharedMemory_Get_FullMethodName     = "/sharedmemory.SharedMemory/Get"
    23  	SharedMemory_Indexed_FullMethodName = "/sharedmemory.SharedMemory/Indexed"
    24  	SharedMemory_Apply_FullMethodName   = "/sharedmemory.SharedMemory/Apply"
    25  )
    26  
    27  // SharedMemoryClient is the client API for SharedMemory service.
    28  //
    29  // 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.
    30  type SharedMemoryClient interface {
    31  	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
    32  	Indexed(ctx context.Context, in *IndexedRequest, opts ...grpc.CallOption) (*IndexedResponse, error)
    33  	Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error)
    34  }
    35  
    36  type sharedMemoryClient struct {
    37  	cc grpc.ClientConnInterface
    38  }
    39  
    40  func NewSharedMemoryClient(cc grpc.ClientConnInterface) SharedMemoryClient {
    41  	return &sharedMemoryClient{cc}
    42  }
    43  
    44  func (c *sharedMemoryClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
    45  	out := new(GetResponse)
    46  	err := c.cc.Invoke(ctx, SharedMemory_Get_FullMethodName, in, out, opts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return out, nil
    51  }
    52  
    53  func (c *sharedMemoryClient) Indexed(ctx context.Context, in *IndexedRequest, opts ...grpc.CallOption) (*IndexedResponse, error) {
    54  	out := new(IndexedResponse)
    55  	err := c.cc.Invoke(ctx, SharedMemory_Indexed_FullMethodName, in, out, opts...)
    56  	if err != nil {
    57  		return nil, err
    58  	}
    59  	return out, nil
    60  }
    61  
    62  func (c *sharedMemoryClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) {
    63  	out := new(ApplyResponse)
    64  	err := c.cc.Invoke(ctx, SharedMemory_Apply_FullMethodName, in, out, opts...)
    65  	if err != nil {
    66  		return nil, err
    67  	}
    68  	return out, nil
    69  }
    70  
    71  // SharedMemoryServer is the server API for SharedMemory service.
    72  // All implementations must embed UnimplementedSharedMemoryServer
    73  // for forward compatibility
    74  type SharedMemoryServer interface {
    75  	Get(context.Context, *GetRequest) (*GetResponse, error)
    76  	Indexed(context.Context, *IndexedRequest) (*IndexedResponse, error)
    77  	Apply(context.Context, *ApplyRequest) (*ApplyResponse, error)
    78  	mustEmbedUnimplementedSharedMemoryServer()
    79  }
    80  
    81  // UnimplementedSharedMemoryServer must be embedded to have forward compatible implementations.
    82  type UnimplementedSharedMemoryServer struct {
    83  }
    84  
    85  func (UnimplementedSharedMemoryServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
    86  	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
    87  }
    88  func (UnimplementedSharedMemoryServer) Indexed(context.Context, *IndexedRequest) (*IndexedResponse, error) {
    89  	return nil, status.Errorf(codes.Unimplemented, "method Indexed not implemented")
    90  }
    91  func (UnimplementedSharedMemoryServer) Apply(context.Context, *ApplyRequest) (*ApplyResponse, error) {
    92  	return nil, status.Errorf(codes.Unimplemented, "method Apply not implemented")
    93  }
    94  func (UnimplementedSharedMemoryServer) mustEmbedUnimplementedSharedMemoryServer() {}
    95  
    96  // UnsafeSharedMemoryServer may be embedded to opt out of forward compatibility for this service.
    97  // Use of this interface is not recommended, as added methods to SharedMemoryServer will
    98  // result in compilation errors.
    99  type UnsafeSharedMemoryServer interface {
   100  	mustEmbedUnimplementedSharedMemoryServer()
   101  }
   102  
   103  func RegisterSharedMemoryServer(s grpc.ServiceRegistrar, srv SharedMemoryServer) {
   104  	s.RegisterService(&SharedMemory_ServiceDesc, srv)
   105  }
   106  
   107  func _SharedMemory_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   108  	in := new(GetRequest)
   109  	if err := dec(in); err != nil {
   110  		return nil, err
   111  	}
   112  	if interceptor == nil {
   113  		return srv.(SharedMemoryServer).Get(ctx, in)
   114  	}
   115  	info := &grpc.UnaryServerInfo{
   116  		Server:     srv,
   117  		FullMethod: SharedMemory_Get_FullMethodName,
   118  	}
   119  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   120  		return srv.(SharedMemoryServer).Get(ctx, req.(*GetRequest))
   121  	}
   122  	return interceptor(ctx, in, info, handler)
   123  }
   124  
   125  func _SharedMemory_Indexed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   126  	in := new(IndexedRequest)
   127  	if err := dec(in); err != nil {
   128  		return nil, err
   129  	}
   130  	if interceptor == nil {
   131  		return srv.(SharedMemoryServer).Indexed(ctx, in)
   132  	}
   133  	info := &grpc.UnaryServerInfo{
   134  		Server:     srv,
   135  		FullMethod: SharedMemory_Indexed_FullMethodName,
   136  	}
   137  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   138  		return srv.(SharedMemoryServer).Indexed(ctx, req.(*IndexedRequest))
   139  	}
   140  	return interceptor(ctx, in, info, handler)
   141  }
   142  
   143  func _SharedMemory_Apply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   144  	in := new(ApplyRequest)
   145  	if err := dec(in); err != nil {
   146  		return nil, err
   147  	}
   148  	if interceptor == nil {
   149  		return srv.(SharedMemoryServer).Apply(ctx, in)
   150  	}
   151  	info := &grpc.UnaryServerInfo{
   152  		Server:     srv,
   153  		FullMethod: SharedMemory_Apply_FullMethodName,
   154  	}
   155  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   156  		return srv.(SharedMemoryServer).Apply(ctx, req.(*ApplyRequest))
   157  	}
   158  	return interceptor(ctx, in, info, handler)
   159  }
   160  
   161  // SharedMemory_ServiceDesc is the grpc.ServiceDesc for SharedMemory service.
   162  // It's only intended for direct use with grpc.RegisterService,
   163  // and not to be introspected or modified (even as a copy)
   164  var SharedMemory_ServiceDesc = grpc.ServiceDesc{
   165  	ServiceName: "sharedmemory.SharedMemory",
   166  	HandlerType: (*SharedMemoryServer)(nil),
   167  	Methods: []grpc.MethodDesc{
   168  		{
   169  			MethodName: "Get",
   170  			Handler:    _SharedMemory_Get_Handler,
   171  		},
   172  		{
   173  			MethodName: "Indexed",
   174  			Handler:    _SharedMemory_Indexed_Handler,
   175  		},
   176  		{
   177  			MethodName: "Apply",
   178  			Handler:    _SharedMemory_Apply_Handler,
   179  		},
   180  	},
   181  	Streams:  []grpc.StreamDesc{},
   182  	Metadata: "sharedmemory/sharedmemory.proto",
   183  }