github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/grpc/interop/grpc_testing/report_qps_scenario_service_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/testing/report_qps_scenario_service.proto 6 7 package grpc_testing 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 // ReportQpsScenarioServiceClient is the client API for ReportQpsScenarioService 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 ReportQpsScenarioServiceClient interface { 25 // Report results of a QPS test benchmark scenario. 26 ReportScenario(ctx context.Context, in *ScenarioResult, opts ...grpc.CallOption) (*Void, error) 27 } 28 29 type reportQpsScenarioServiceClient struct { 30 cc grpc.ClientConnInterface 31 } 32 33 func NewReportQpsScenarioServiceClient(cc grpc.ClientConnInterface) ReportQpsScenarioServiceClient { 34 return &reportQpsScenarioServiceClient{cc} 35 } 36 37 func (c *reportQpsScenarioServiceClient) ReportScenario(ctx context.Context, in *ScenarioResult, opts ...grpc.CallOption) (*Void, error) { 38 out := new(Void) 39 err := c.cc.Invoke(ctx, "/grpc.testing.ReportQpsScenarioService/ReportScenario", in, out, opts...) 40 if err != nil { 41 return nil, err 42 } 43 return out, nil 44 } 45 46 // ReportQpsScenarioServiceServer is the server API for ReportQpsScenarioService service. 47 // All implementations must embed UnimplementedReportQpsScenarioServiceServer 48 // for forward compatibility 49 type ReportQpsScenarioServiceServer interface { 50 // Report results of a QPS test benchmark scenario. 51 ReportScenario(context.Context, *ScenarioResult) (*Void, error) 52 mustEmbedUnimplementedReportQpsScenarioServiceServer() 53 } 54 55 // UnimplementedReportQpsScenarioServiceServer must be embedded to have forward compatible implementations. 56 type UnimplementedReportQpsScenarioServiceServer struct { 57 } 58 59 func (UnimplementedReportQpsScenarioServiceServer) ReportScenario(context.Context, *ScenarioResult) (*Void, error) { 60 return nil, status.Errorf(codes.Unimplemented, "method ReportScenario not implemented") 61 } 62 func (UnimplementedReportQpsScenarioServiceServer) mustEmbedUnimplementedReportQpsScenarioServiceServer() { 63 } 64 65 // UnsafeReportQpsScenarioServiceServer may be embedded to opt out of forward compatibility for this service. 66 // Use of this interface is not recommended, as added methods to ReportQpsScenarioServiceServer will 67 // result in compilation errors. 68 type UnsafeReportQpsScenarioServiceServer interface { 69 mustEmbedUnimplementedReportQpsScenarioServiceServer() 70 } 71 72 func RegisterReportQpsScenarioServiceServer(s grpc.ServiceRegistrar, srv ReportQpsScenarioServiceServer) { 73 s.RegisterService(&ReportQpsScenarioService_ServiceDesc, srv) 74 } 75 76 func _ReportQpsScenarioService_ReportScenario_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 77 in := new(ScenarioResult) 78 if err := dec(in); err != nil { 79 return nil, err 80 } 81 if interceptor == nil { 82 return srv.(ReportQpsScenarioServiceServer).ReportScenario(ctx, in) 83 } 84 info := &grpc.UnaryServerInfo{ 85 Server: srv, 86 FullMethod: "/grpc.testing.ReportQpsScenarioService/ReportScenario", 87 } 88 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 89 return srv.(ReportQpsScenarioServiceServer).ReportScenario(ctx, req.(*ScenarioResult)) 90 } 91 return interceptor(ctx, in, info, handler) 92 } 93 94 // ReportQpsScenarioService_ServiceDesc is the grpc.ServiceDesc for ReportQpsScenarioService service. 95 // It's only intended for direct use with grpc.RegisterService, 96 // and not to be introspected or modified (even as a copy) 97 var ReportQpsScenarioService_ServiceDesc = grpc.ServiceDesc{ 98 ServiceName: "grpc.testing.ReportQpsScenarioService", 99 HandlerType: (*ReportQpsScenarioServiceServer)(nil), 100 Methods: []grpc.MethodDesc{ 101 { 102 MethodName: "ReportScenario", 103 Handler: _ReportQpsScenarioService_ReportScenario_Handler, 104 }, 105 }, 106 Streams: []grpc.StreamDesc{}, 107 Metadata: "grpc/testing/report_qps_scenario_service.proto", 108 }