google.golang.org/grpc@v1.62.1/interop/grpc_testing/report_qps_scenario_service_grpc.pb.go (about) 1 // Copyright 2015 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 // An integration test service that covers all the method signature permutations 16 // of unary/streaming requests/responses. 17 18 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 19 // versions: 20 // - protoc-gen-go-grpc v1.3.0 21 // - protoc v4.25.2 22 // source: grpc/testing/report_qps_scenario_service.proto 23 24 package grpc_testing 25 26 import ( 27 context "context" 28 grpc "google.golang.org/grpc" 29 codes "google.golang.org/grpc/codes" 30 status "google.golang.org/grpc/status" 31 ) 32 33 // This is a compile-time assertion to ensure that this generated file 34 // is compatible with the grpc package it is being compiled against. 35 // Requires gRPC-Go v1.32.0 or later. 36 const _ = grpc.SupportPackageIsVersion7 37 38 const ( 39 ReportQpsScenarioService_ReportScenario_FullMethodName = "/grpc.testing.ReportQpsScenarioService/ReportScenario" 40 ) 41 42 // ReportQpsScenarioServiceClient is the client API for ReportQpsScenarioService service. 43 // 44 // 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. 45 type ReportQpsScenarioServiceClient interface { 46 // Report results of a QPS test benchmark scenario. 47 ReportScenario(ctx context.Context, in *ScenarioResult, opts ...grpc.CallOption) (*Void, error) 48 } 49 50 type reportQpsScenarioServiceClient struct { 51 cc grpc.ClientConnInterface 52 } 53 54 func NewReportQpsScenarioServiceClient(cc grpc.ClientConnInterface) ReportQpsScenarioServiceClient { 55 return &reportQpsScenarioServiceClient{cc} 56 } 57 58 func (c *reportQpsScenarioServiceClient) ReportScenario(ctx context.Context, in *ScenarioResult, opts ...grpc.CallOption) (*Void, error) { 59 out := new(Void) 60 err := c.cc.Invoke(ctx, ReportQpsScenarioService_ReportScenario_FullMethodName, in, out, opts...) 61 if err != nil { 62 return nil, err 63 } 64 return out, nil 65 } 66 67 // ReportQpsScenarioServiceServer is the server API for ReportQpsScenarioService service. 68 // All implementations must embed UnimplementedReportQpsScenarioServiceServer 69 // for forward compatibility 70 type ReportQpsScenarioServiceServer interface { 71 // Report results of a QPS test benchmark scenario. 72 ReportScenario(context.Context, *ScenarioResult) (*Void, error) 73 mustEmbedUnimplementedReportQpsScenarioServiceServer() 74 } 75 76 // UnimplementedReportQpsScenarioServiceServer must be embedded to have forward compatible implementations. 77 type UnimplementedReportQpsScenarioServiceServer struct { 78 } 79 80 func (UnimplementedReportQpsScenarioServiceServer) ReportScenario(context.Context, *ScenarioResult) (*Void, error) { 81 return nil, status.Errorf(codes.Unimplemented, "method ReportScenario not implemented") 82 } 83 func (UnimplementedReportQpsScenarioServiceServer) mustEmbedUnimplementedReportQpsScenarioServiceServer() { 84 } 85 86 // UnsafeReportQpsScenarioServiceServer may be embedded to opt out of forward compatibility for this service. 87 // Use of this interface is not recommended, as added methods to ReportQpsScenarioServiceServer will 88 // result in compilation errors. 89 type UnsafeReportQpsScenarioServiceServer interface { 90 mustEmbedUnimplementedReportQpsScenarioServiceServer() 91 } 92 93 func RegisterReportQpsScenarioServiceServer(s grpc.ServiceRegistrar, srv ReportQpsScenarioServiceServer) { 94 s.RegisterService(&ReportQpsScenarioService_ServiceDesc, srv) 95 } 96 97 func _ReportQpsScenarioService_ReportScenario_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 98 in := new(ScenarioResult) 99 if err := dec(in); err != nil { 100 return nil, err 101 } 102 if interceptor == nil { 103 return srv.(ReportQpsScenarioServiceServer).ReportScenario(ctx, in) 104 } 105 info := &grpc.UnaryServerInfo{ 106 Server: srv, 107 FullMethod: ReportQpsScenarioService_ReportScenario_FullMethodName, 108 } 109 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 110 return srv.(ReportQpsScenarioServiceServer).ReportScenario(ctx, req.(*ScenarioResult)) 111 } 112 return interceptor(ctx, in, info, handler) 113 } 114 115 // ReportQpsScenarioService_ServiceDesc is the grpc.ServiceDesc for ReportQpsScenarioService service. 116 // It's only intended for direct use with grpc.RegisterService, 117 // and not to be introspected or modified (even as a copy) 118 var ReportQpsScenarioService_ServiceDesc = grpc.ServiceDesc{ 119 ServiceName: "grpc.testing.ReportQpsScenarioService", 120 HandlerType: (*ReportQpsScenarioServiceServer)(nil), 121 Methods: []grpc.MethodDesc{ 122 { 123 MethodName: "ReportScenario", 124 Handler: _ReportQpsScenarioService_ReportScenario_Handler, 125 }, 126 }, 127 Streams: []grpc.StreamDesc{}, 128 Metadata: "grpc/testing/report_qps_scenario_service.proto", 129 }