google.golang.org/grpc@v1.62.1/internal/proto/grpc_lookup_v1/rls_grpc.pb.go (about) 1 // Copyright 2020 The gRPC Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 16 // versions: 17 // - protoc-gen-go-grpc v1.3.0 18 // - protoc v4.25.2 19 // source: grpc/lookup/v1/rls.proto 20 21 package grpc_lookup_v1 22 23 import ( 24 context "context" 25 grpc "google.golang.org/grpc" 26 codes "google.golang.org/grpc/codes" 27 status "google.golang.org/grpc/status" 28 ) 29 30 // This is a compile-time assertion to ensure that this generated file 31 // is compatible with the grpc package it is being compiled against. 32 // Requires gRPC-Go v1.32.0 or later. 33 const _ = grpc.SupportPackageIsVersion7 34 35 const ( 36 RouteLookupService_RouteLookup_FullMethodName = "/grpc.lookup.v1.RouteLookupService/RouteLookup" 37 ) 38 39 // RouteLookupServiceClient is the client API for RouteLookupService service. 40 // 41 // 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. 42 type RouteLookupServiceClient interface { 43 // Lookup returns a target for a single key. 44 RouteLookup(ctx context.Context, in *RouteLookupRequest, opts ...grpc.CallOption) (*RouteLookupResponse, error) 45 } 46 47 type routeLookupServiceClient struct { 48 cc grpc.ClientConnInterface 49 } 50 51 func NewRouteLookupServiceClient(cc grpc.ClientConnInterface) RouteLookupServiceClient { 52 return &routeLookupServiceClient{cc} 53 } 54 55 func (c *routeLookupServiceClient) RouteLookup(ctx context.Context, in *RouteLookupRequest, opts ...grpc.CallOption) (*RouteLookupResponse, error) { 56 out := new(RouteLookupResponse) 57 err := c.cc.Invoke(ctx, RouteLookupService_RouteLookup_FullMethodName, in, out, opts...) 58 if err != nil { 59 return nil, err 60 } 61 return out, nil 62 } 63 64 // RouteLookupServiceServer is the server API for RouteLookupService service. 65 // All implementations must embed UnimplementedRouteLookupServiceServer 66 // for forward compatibility 67 type RouteLookupServiceServer interface { 68 // Lookup returns a target for a single key. 69 RouteLookup(context.Context, *RouteLookupRequest) (*RouteLookupResponse, error) 70 mustEmbedUnimplementedRouteLookupServiceServer() 71 } 72 73 // UnimplementedRouteLookupServiceServer must be embedded to have forward compatible implementations. 74 type UnimplementedRouteLookupServiceServer struct { 75 } 76 77 func (UnimplementedRouteLookupServiceServer) RouteLookup(context.Context, *RouteLookupRequest) (*RouteLookupResponse, error) { 78 return nil, status.Errorf(codes.Unimplemented, "method RouteLookup not implemented") 79 } 80 func (UnimplementedRouteLookupServiceServer) mustEmbedUnimplementedRouteLookupServiceServer() {} 81 82 // UnsafeRouteLookupServiceServer may be embedded to opt out of forward compatibility for this service. 83 // Use of this interface is not recommended, as added methods to RouteLookupServiceServer will 84 // result in compilation errors. 85 type UnsafeRouteLookupServiceServer interface { 86 mustEmbedUnimplementedRouteLookupServiceServer() 87 } 88 89 func RegisterRouteLookupServiceServer(s grpc.ServiceRegistrar, srv RouteLookupServiceServer) { 90 s.RegisterService(&RouteLookupService_ServiceDesc, srv) 91 } 92 93 func _RouteLookupService_RouteLookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 94 in := new(RouteLookupRequest) 95 if err := dec(in); err != nil { 96 return nil, err 97 } 98 if interceptor == nil { 99 return srv.(RouteLookupServiceServer).RouteLookup(ctx, in) 100 } 101 info := &grpc.UnaryServerInfo{ 102 Server: srv, 103 FullMethod: RouteLookupService_RouteLookup_FullMethodName, 104 } 105 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 106 return srv.(RouteLookupServiceServer).RouteLookup(ctx, req.(*RouteLookupRequest)) 107 } 108 return interceptor(ctx, in, info, handler) 109 } 110 111 // RouteLookupService_ServiceDesc is the grpc.ServiceDesc for RouteLookupService service. 112 // It's only intended for direct use with grpc.RegisterService, 113 // and not to be introspected or modified (even as a copy) 114 var RouteLookupService_ServiceDesc = grpc.ServiceDesc{ 115 ServiceName: "grpc.lookup.v1.RouteLookupService", 116 HandlerType: (*RouteLookupServiceServer)(nil), 117 Methods: []grpc.MethodDesc{ 118 { 119 MethodName: "RouteLookup", 120 Handler: _RouteLookupService_RouteLookup_Handler, 121 }, 122 }, 123 Streams: []grpc.StreamDesc{}, 124 Metadata: "grpc/lookup/v1/rls.proto", 125 }