agones.dev/agones@v1.54.0/pkg/allocation/go/allocation_grpc.pb.go (about) 1 // Copyright 2024 Google LLC All Rights Reserved. 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 // This code was autogenerated. Do not edit directly. 16 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 17 // versions: 18 // - protoc-gen-go-grpc v1.2.0 19 // - protoc v6.31.1 20 // source: proto/allocation/allocation.proto 21 22 package allocation 23 24 import ( 25 context "context" 26 27 grpc "google.golang.org/grpc" 28 codes "google.golang.org/grpc/codes" 29 status "google.golang.org/grpc/status" 30 ) 31 32 // This is a compile-time assertion to ensure that this generated file 33 // is compatible with the grpc package it is being compiled against. 34 // Requires gRPC-Go v1.32.0 or later. 35 const _ = grpc.SupportPackageIsVersion7 36 37 // AllocationServiceClient is the client API for AllocationService service. 38 // 39 // 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. 40 type AllocationServiceClient interface { 41 Allocate(ctx context.Context, in *AllocationRequest, opts ...grpc.CallOption) (*AllocationResponse, error) 42 } 43 44 type allocationServiceClient struct { 45 cc grpc.ClientConnInterface 46 } 47 48 func NewAllocationServiceClient(cc grpc.ClientConnInterface) AllocationServiceClient { 49 return &allocationServiceClient{cc} 50 } 51 52 func (c *allocationServiceClient) Allocate(ctx context.Context, in *AllocationRequest, opts ...grpc.CallOption) (*AllocationResponse, error) { 53 out := new(AllocationResponse) 54 err := c.cc.Invoke(ctx, "/allocation.AllocationService/Allocate", in, out, opts...) 55 if err != nil { 56 return nil, err 57 } 58 return out, nil 59 } 60 61 // AllocationServiceServer is the server API for AllocationService service. 62 // All implementations should embed UnimplementedAllocationServiceServer 63 // for forward compatibility 64 type AllocationServiceServer interface { 65 Allocate(context.Context, *AllocationRequest) (*AllocationResponse, error) 66 } 67 68 // UnimplementedAllocationServiceServer should be embedded to have forward compatible implementations. 69 type UnimplementedAllocationServiceServer struct { 70 } 71 72 func (UnimplementedAllocationServiceServer) Allocate(context.Context, *AllocationRequest) (*AllocationResponse, error) { 73 return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") 74 } 75 76 // UnsafeAllocationServiceServer may be embedded to opt out of forward compatibility for this service. 77 // Use of this interface is not recommended, as added methods to AllocationServiceServer will 78 // result in compilation errors. 79 type UnsafeAllocationServiceServer interface { 80 mustEmbedUnimplementedAllocationServiceServer() 81 } 82 83 func RegisterAllocationServiceServer(s grpc.ServiceRegistrar, srv AllocationServiceServer) { 84 s.RegisterService(&AllocationService_ServiceDesc, srv) 85 } 86 87 func _AllocationService_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 88 in := new(AllocationRequest) 89 if err := dec(in); err != nil { 90 return nil, err 91 } 92 if interceptor == nil { 93 return srv.(AllocationServiceServer).Allocate(ctx, in) 94 } 95 info := &grpc.UnaryServerInfo{ 96 Server: srv, 97 FullMethod: "/allocation.AllocationService/Allocate", 98 } 99 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 100 return srv.(AllocationServiceServer).Allocate(ctx, req.(*AllocationRequest)) 101 } 102 return interceptor(ctx, in, info, handler) 103 } 104 105 // AllocationService_ServiceDesc is the grpc.ServiceDesc for AllocationService service. 106 // It's only intended for direct use with grpc.RegisterService, 107 // and not to be introspected or modified (even as a copy) 108 var AllocationService_ServiceDesc = grpc.ServiceDesc{ 109 ServiceName: "allocation.AllocationService", 110 HandlerType: (*AllocationServiceServer)(nil), 111 Methods: []grpc.MethodDesc{ 112 { 113 MethodName: "Allocate", 114 Handler: _AllocationService_Allocate_Handler, 115 }, 116 }, 117 Streams: []grpc.StreamDesc{}, 118 Metadata: "proto/allocation/allocation.proto", 119 }