...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
34
35
36 const _ = grpc.SupportPackageIsVersion9
37
38 const (
39 ReportQpsScenarioService_ReportScenario_FullMethodName = "/grpc.testing.ReportQpsScenarioService/ReportScenario"
40 )
41
42
43
44
45 type ReportQpsScenarioServiceClient interface {
46
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 cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
60 out := new(Void)
61 err := c.cc.Invoke(ctx, ReportQpsScenarioService_ReportScenario_FullMethodName, in, out, cOpts...)
62 if err != nil {
63 return nil, err
64 }
65 return out, nil
66 }
67
68
69
70
71 type ReportQpsScenarioServiceServer interface {
72
73 ReportScenario(context.Context, *ScenarioResult) (*Void, error)
74 mustEmbedUnimplementedReportQpsScenarioServiceServer()
75 }
76
77
78 type UnimplementedReportQpsScenarioServiceServer struct {
79 }
80
81 func (UnimplementedReportQpsScenarioServiceServer) ReportScenario(context.Context, *ScenarioResult) (*Void, error) {
82 return nil, status.Errorf(codes.Unimplemented, "method ReportScenario not implemented")
83 }
84 func (UnimplementedReportQpsScenarioServiceServer) mustEmbedUnimplementedReportQpsScenarioServiceServer() {
85 }
86
87
88
89
90 type UnsafeReportQpsScenarioServiceServer interface {
91 mustEmbedUnimplementedReportQpsScenarioServiceServer()
92 }
93
94 func RegisterReportQpsScenarioServiceServer(s grpc.ServiceRegistrar, srv ReportQpsScenarioServiceServer) {
95 s.RegisterService(&ReportQpsScenarioService_ServiceDesc, srv)
96 }
97
98 func _ReportQpsScenarioService_ReportScenario_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
99 in := new(ScenarioResult)
100 if err := dec(in); err != nil {
101 return nil, err
102 }
103 if interceptor == nil {
104 return srv.(ReportQpsScenarioServiceServer).ReportScenario(ctx, in)
105 }
106 info := &grpc.UnaryServerInfo{
107 Server: srv,
108 FullMethod: ReportQpsScenarioService_ReportScenario_FullMethodName,
109 }
110 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
111 return srv.(ReportQpsScenarioServiceServer).ReportScenario(ctx, req.(*ScenarioResult))
112 }
113 return interceptor(ctx, in, info, handler)
114 }
115
116
117
118
119 var ReportQpsScenarioService_ServiceDesc = grpc.ServiceDesc{
120 ServiceName: "grpc.testing.ReportQpsScenarioService",
121 HandlerType: (*ReportQpsScenarioServiceServer)(nil),
122 Methods: []grpc.MethodDesc{
123 {
124 MethodName: "ReportScenario",
125 Handler: _ReportQpsScenarioService_ReportScenario_Handler,
126 },
127 },
128 Streams: []grpc.StreamDesc{},
129 Metadata: "grpc/testing/report_qps_scenario_service.proto",
130 }
131
View as plain text