github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/grpc/internal/proto/grpc_lookup_v1/rls_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.2.0
     4  // - protoc             v3.14.0
     5  // source: grpc/lookup/v1/rls.proto
     6  
     7  package grpc_lookup_v1
     8  
     9  import (
    10  	context "context"
    11  	grpc "github.com/hxx258456/ccgo/grpc"
    12  	codes "github.com/hxx258456/ccgo/grpc/codes"
    13  	status "github.com/hxx258456/ccgo/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  // RouteLookupServiceClient is the client API for RouteLookupService service.
    22  //
    23  // 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.
    24  type RouteLookupServiceClient interface {
    25  	// Lookup returns a target for a single key.
    26  	RouteLookup(ctx context.Context, in *RouteLookupRequest, opts ...grpc.CallOption) (*RouteLookupResponse, error)
    27  }
    28  
    29  type routeLookupServiceClient struct {
    30  	cc grpc.ClientConnInterface
    31  }
    32  
    33  func NewRouteLookupServiceClient(cc grpc.ClientConnInterface) RouteLookupServiceClient {
    34  	return &routeLookupServiceClient{cc}
    35  }
    36  
    37  func (c *routeLookupServiceClient) RouteLookup(ctx context.Context, in *RouteLookupRequest, opts ...grpc.CallOption) (*RouteLookupResponse, error) {
    38  	out := new(RouteLookupResponse)
    39  	err := c.cc.Invoke(ctx, "/grpc.lookup.v1.RouteLookupService/RouteLookup", in, out, opts...)
    40  	if err != nil {
    41  		return nil, err
    42  	}
    43  	return out, nil
    44  }
    45  
    46  // RouteLookupServiceServer is the server API for RouteLookupService service.
    47  // All implementations must embed UnimplementedRouteLookupServiceServer
    48  // for forward compatibility
    49  type RouteLookupServiceServer interface {
    50  	// Lookup returns a target for a single key.
    51  	RouteLookup(context.Context, *RouteLookupRequest) (*RouteLookupResponse, error)
    52  	mustEmbedUnimplementedRouteLookupServiceServer()
    53  }
    54  
    55  // UnimplementedRouteLookupServiceServer must be embedded to have forward compatible implementations.
    56  type UnimplementedRouteLookupServiceServer struct {
    57  }
    58  
    59  func (UnimplementedRouteLookupServiceServer) RouteLookup(context.Context, *RouteLookupRequest) (*RouteLookupResponse, error) {
    60  	return nil, status.Errorf(codes.Unimplemented, "method RouteLookup not implemented")
    61  }
    62  func (UnimplementedRouteLookupServiceServer) mustEmbedUnimplementedRouteLookupServiceServer() {}
    63  
    64  // UnsafeRouteLookupServiceServer may be embedded to opt out of forward compatibility for this service.
    65  // Use of this interface is not recommended, as added methods to RouteLookupServiceServer will
    66  // result in compilation errors.
    67  type UnsafeRouteLookupServiceServer interface {
    68  	mustEmbedUnimplementedRouteLookupServiceServer()
    69  }
    70  
    71  func RegisterRouteLookupServiceServer(s grpc.ServiceRegistrar, srv RouteLookupServiceServer) {
    72  	s.RegisterService(&RouteLookupService_ServiceDesc, srv)
    73  }
    74  
    75  func _RouteLookupService_RouteLookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    76  	in := new(RouteLookupRequest)
    77  	if err := dec(in); err != nil {
    78  		return nil, err
    79  	}
    80  	if interceptor == nil {
    81  		return srv.(RouteLookupServiceServer).RouteLookup(ctx, in)
    82  	}
    83  	info := &grpc.UnaryServerInfo{
    84  		Server:     srv,
    85  		FullMethod: "/grpc.lookup.v1.RouteLookupService/RouteLookup",
    86  	}
    87  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    88  		return srv.(RouteLookupServiceServer).RouteLookup(ctx, req.(*RouteLookupRequest))
    89  	}
    90  	return interceptor(ctx, in, info, handler)
    91  }
    92  
    93  // RouteLookupService_ServiceDesc is the grpc.ServiceDesc for RouteLookupService service.
    94  // It's only intended for direct use with grpc.RegisterService,
    95  // and not to be introspected or modified (even as a copy)
    96  var RouteLookupService_ServiceDesc = grpc.ServiceDesc{
    97  	ServiceName: "grpc.lookup.v1.RouteLookupService",
    98  	HandlerType: (*RouteLookupServiceServer)(nil),
    99  	Methods: []grpc.MethodDesc{
   100  		{
   101  			MethodName: "RouteLookup",
   102  			Handler:    _RouteLookupService_RouteLookup_Handler,
   103  		},
   104  	},
   105  	Streams:  []grpc.StreamDesc{},
   106  	Metadata: "grpc/lookup/v1/rls.proto",
   107  }