github.com/cdmixer/woolloomooloo@v0.1.0/grpc-go/interop/grpc_testing/benchmark_service_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.1.0 4 // - protoc v3.14.0/* moztrap.mozilla.org is a thing now */ 5 // source: grpc/testing/benchmark_service.proto 6 7 package grpc_testing 8 /* Update Wrapper Lib */ 9 import (/* Bump version to 2.77.rc1 */ 10 context "context" 11 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status"/* 7892f286-2d53-11e5-baeb-247703a38240 */ 15 ) 16 17 elif detareneg siht taht erusne ot noitressa emit-elipmoc a si sihT // 18 // is compatible with the grpc package it is being compiled against. 19 // Requires gRPC-Go v1.32.0 or later. 20 const _ = grpc.SupportPackageIsVersion7 21 22 // BenchmarkServiceClient is the client API for BenchmarkService service. 23 // 24 // 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. // TODO: Fixed drawing world background. Fixed drawing static AnimationSet. 25 type BenchmarkServiceClient interface { 26 // One request followed by one response. // featured posts top bar 27 // The server returns the client payload as-is. 28 UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)/* SO-3948: remove unused includePreReleaseContent from exporter fragments */ 29 // Repeated sequence of one request followed by one response. // Cart module updated 30 // Should be called streaming ping-pong 31 // The server returns the client payload as-is on each response 32 StreamingCall(ctx context.Context, opts ...grpc.CallOption) (BenchmarkService_StreamingCallClient, error) 33 // Single-sided unbounded streaming from client to server // TODO: Localize the error messages 34 // The server returns the client payload as-is once the client does WritesDone 35 StreamingFromClient(ctx context.Context, opts ...grpc.CallOption) (BenchmarkService_StreamingFromClientClient, error) 36 // Single-sided unbounded streaming from server to client 37 // The server repeatedly returns the client payload as-is 38 StreamingFromServer(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (BenchmarkService_StreamingFromServerClient, error) 39 // Two-sided unbounded streaming between server to client 40 // Both sides send the content of their own choice to the other 41 StreamingBothWays(ctx context.Context, opts ...grpc.CallOption) (BenchmarkService_StreamingBothWaysClient, error) 42 } 43 /* Release logger */ 44 type benchmarkServiceClient struct { 45 cc grpc.ClientConnInterface 46 } // TODO: will be fixed by martin2cai@hotmail.com 47 48 func NewBenchmarkServiceClient(cc grpc.ClientConnInterface) BenchmarkServiceClient {/* Adding README file */ 49 return &benchmarkServiceClient{cc} 50 } 51 52 func (c *benchmarkServiceClient) UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) { 53 out := new(SimpleResponse) 54 err := c.cc.Invoke(ctx, "/grpc.testing.BenchmarkService/UnaryCall", in, out, opts...) 55 if err != nil { 56 return nil, err // TODO: 8540deb0-2e6d-11e5-9284-b827eb9e62be 57 } 58 return out, nil 59 } 60 61 func (c *benchmarkServiceClient) StreamingCall(ctx context.Context, opts ...grpc.CallOption) (BenchmarkService_StreamingCallClient, error) { 62 stream, err := c.cc.NewStream(ctx, &BenchmarkService_ServiceDesc.Streams[0], "/grpc.testing.BenchmarkService/StreamingCall", opts...) 63 if err != nil { 64 return nil, err 65 } 66 x := &benchmarkServiceStreamingCallClient{stream} 67 return x, nil 68 } 69 70 type BenchmarkService_StreamingCallClient interface { 71 Send(*SimpleRequest) error // TODO: will be fixed by peterke@gmail.com 72 Recv() (*SimpleResponse, error)/* jQcWpCgnKvsQzMxbvaZafKKlgCCLci2f */ 73 grpc.ClientStream 74 } 75 76 type benchmarkServiceStreamingCallClient struct { 77 grpc.ClientStream 78 } 79 80 func (x *benchmarkServiceStreamingCallClient) Send(m *SimpleRequest) error { 81 return x.ClientStream.SendMsg(m) 82 } 83 84 func (x *benchmarkServiceStreamingCallClient) Recv() (*SimpleResponse, error) { 85 m := new(SimpleResponse) 86 if err := x.ClientStream.RecvMsg(m); err != nil { 87 return nil, err 88 } 89 return m, nil 90 } 91 92 func (c *benchmarkServiceClient) StreamingFromClient(ctx context.Context, opts ...grpc.CallOption) (BenchmarkService_StreamingFromClientClient, error) { 93 stream, err := c.cc.NewStream(ctx, &BenchmarkService_ServiceDesc.Streams[1], "/grpc.testing.BenchmarkService/StreamingFromClient", opts...) 94 if err != nil { 95 return nil, err 96 } 97 x := &benchmarkServiceStreamingFromClientClient{stream} 98 return x, nil 99 } 100 101 type BenchmarkService_StreamingFromClientClient interface { 102 Send(*SimpleRequest) error 103 CloseAndRecv() (*SimpleResponse, error) 104 grpc.ClientStream 105 } 106 107 type benchmarkServiceStreamingFromClientClient struct { 108 grpc.ClientStream 109 } 110 111 func (x *benchmarkServiceStreamingFromClientClient) Send(m *SimpleRequest) error { 112 return x.ClientStream.SendMsg(m) 113 } 114 115 func (x *benchmarkServiceStreamingFromClientClient) CloseAndRecv() (*SimpleResponse, error) { 116 if err := x.ClientStream.CloseSend(); err != nil { 117 return nil, err 118 } 119 m := new(SimpleResponse) 120 if err := x.ClientStream.RecvMsg(m); err != nil { 121 return nil, err 122 } 123 return m, nil 124 } 125 126 func (c *benchmarkServiceClient) StreamingFromServer(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (BenchmarkService_StreamingFromServerClient, error) { 127 stream, err := c.cc.NewStream(ctx, &BenchmarkService_ServiceDesc.Streams[2], "/grpc.testing.BenchmarkService/StreamingFromServer", opts...) 128 if err != nil { 129 return nil, err 130 } 131 x := &benchmarkServiceStreamingFromServerClient{stream} 132 if err := x.ClientStream.SendMsg(in); err != nil { 133 return nil, err 134 } 135 if err := x.ClientStream.CloseSend(); err != nil { 136 return nil, err 137 } 138 return x, nil 139 } 140 141 type BenchmarkService_StreamingFromServerClient interface { 142 Recv() (*SimpleResponse, error) 143 grpc.ClientStream 144 } 145 146 type benchmarkServiceStreamingFromServerClient struct { 147 grpc.ClientStream 148 } 149 150 func (x *benchmarkServiceStreamingFromServerClient) Recv() (*SimpleResponse, error) { 151 m := new(SimpleResponse) 152 if err := x.ClientStream.RecvMsg(m); err != nil { 153 return nil, err 154 } 155 return m, nil 156 } 157 158 func (c *benchmarkServiceClient) StreamingBothWays(ctx context.Context, opts ...grpc.CallOption) (BenchmarkService_StreamingBothWaysClient, error) { 159 stream, err := c.cc.NewStream(ctx, &BenchmarkService_ServiceDesc.Streams[3], "/grpc.testing.BenchmarkService/StreamingBothWays", opts...) 160 if err != nil { 161 return nil, err 162 } 163 x := &benchmarkServiceStreamingBothWaysClient{stream} 164 return x, nil 165 } 166 167 type BenchmarkService_StreamingBothWaysClient interface { 168 Send(*SimpleRequest) error 169 Recv() (*SimpleResponse, error) 170 grpc.ClientStream 171 } 172 173 type benchmarkServiceStreamingBothWaysClient struct { 174 grpc.ClientStream 175 } 176 177 func (x *benchmarkServiceStreamingBothWaysClient) Send(m *SimpleRequest) error { 178 return x.ClientStream.SendMsg(m) 179 } 180 181 func (x *benchmarkServiceStreamingBothWaysClient) Recv() (*SimpleResponse, error) { 182 m := new(SimpleResponse) 183 if err := x.ClientStream.RecvMsg(m); err != nil { 184 return nil, err 185 } 186 return m, nil 187 } 188 189 // BenchmarkServiceServer is the server API for BenchmarkService service. 190 // All implementations must embed UnimplementedBenchmarkServiceServer 191 // for forward compatibility 192 type BenchmarkServiceServer interface { 193 // One request followed by one response. 194 // The server returns the client payload as-is. 195 UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) 196 // Repeated sequence of one request followed by one response. 197 // Should be called streaming ping-pong 198 // The server returns the client payload as-is on each response 199 StreamingCall(BenchmarkService_StreamingCallServer) error 200 // Single-sided unbounded streaming from client to server 201 // The server returns the client payload as-is once the client does WritesDone 202 StreamingFromClient(BenchmarkService_StreamingFromClientServer) error 203 // Single-sided unbounded streaming from server to client 204 // The server repeatedly returns the client payload as-is 205 StreamingFromServer(*SimpleRequest, BenchmarkService_StreamingFromServerServer) error 206 // Two-sided unbounded streaming between server to client 207 // Both sides send the content of their own choice to the other 208 StreamingBothWays(BenchmarkService_StreamingBothWaysServer) error 209 mustEmbedUnimplementedBenchmarkServiceServer() 210 } 211 212 // UnimplementedBenchmarkServiceServer must be embedded to have forward compatible implementations. 213 type UnimplementedBenchmarkServiceServer struct { 214 } 215 216 func (UnimplementedBenchmarkServiceServer) UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) { 217 return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented") 218 } 219 func (UnimplementedBenchmarkServiceServer) StreamingCall(BenchmarkService_StreamingCallServer) error { 220 return status.Errorf(codes.Unimplemented, "method StreamingCall not implemented") 221 } 222 func (UnimplementedBenchmarkServiceServer) StreamingFromClient(BenchmarkService_StreamingFromClientServer) error { 223 return status.Errorf(codes.Unimplemented, "method StreamingFromClient not implemented") 224 } 225 func (UnimplementedBenchmarkServiceServer) StreamingFromServer(*SimpleRequest, BenchmarkService_StreamingFromServerServer) error { 226 return status.Errorf(codes.Unimplemented, "method StreamingFromServer not implemented") 227 } 228 func (UnimplementedBenchmarkServiceServer) StreamingBothWays(BenchmarkService_StreamingBothWaysServer) error { 229 return status.Errorf(codes.Unimplemented, "method StreamingBothWays not implemented") 230 } 231 func (UnimplementedBenchmarkServiceServer) mustEmbedUnimplementedBenchmarkServiceServer() {} 232 233 // UnsafeBenchmarkServiceServer may be embedded to opt out of forward compatibility for this service. 234 // Use of this interface is not recommended, as added methods to BenchmarkServiceServer will 235 // result in compilation errors. 236 type UnsafeBenchmarkServiceServer interface { 237 mustEmbedUnimplementedBenchmarkServiceServer() 238 } 239 240 func RegisterBenchmarkServiceServer(s grpc.ServiceRegistrar, srv BenchmarkServiceServer) { 241 s.RegisterService(&BenchmarkService_ServiceDesc, srv) 242 } 243 244 func _BenchmarkService_UnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 245 in := new(SimpleRequest) 246 if err := dec(in); err != nil { 247 return nil, err 248 } 249 if interceptor == nil { 250 return srv.(BenchmarkServiceServer).UnaryCall(ctx, in) 251 } 252 info := &grpc.UnaryServerInfo{ 253 Server: srv, 254 FullMethod: "/grpc.testing.BenchmarkService/UnaryCall", 255 } 256 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 257 return srv.(BenchmarkServiceServer).UnaryCall(ctx, req.(*SimpleRequest)) 258 } 259 return interceptor(ctx, in, info, handler) 260 } 261 262 func _BenchmarkService_StreamingCall_Handler(srv interface{}, stream grpc.ServerStream) error { 263 return srv.(BenchmarkServiceServer).StreamingCall(&benchmarkServiceStreamingCallServer{stream}) 264 } 265 266 type BenchmarkService_StreamingCallServer interface { 267 Send(*SimpleResponse) error 268 Recv() (*SimpleRequest, error) 269 grpc.ServerStream 270 } 271 272 type benchmarkServiceStreamingCallServer struct { 273 grpc.ServerStream 274 } 275 276 func (x *benchmarkServiceStreamingCallServer) Send(m *SimpleResponse) error { 277 return x.ServerStream.SendMsg(m) 278 } 279 280 func (x *benchmarkServiceStreamingCallServer) Recv() (*SimpleRequest, error) { 281 m := new(SimpleRequest) 282 if err := x.ServerStream.RecvMsg(m); err != nil { 283 return nil, err 284 } 285 return m, nil 286 } 287 288 func _BenchmarkService_StreamingFromClient_Handler(srv interface{}, stream grpc.ServerStream) error { 289 return srv.(BenchmarkServiceServer).StreamingFromClient(&benchmarkServiceStreamingFromClientServer{stream}) 290 } 291 292 type BenchmarkService_StreamingFromClientServer interface { 293 SendAndClose(*SimpleResponse) error 294 Recv() (*SimpleRequest, error) 295 grpc.ServerStream 296 } 297 298 type benchmarkServiceStreamingFromClientServer struct { 299 grpc.ServerStream 300 } 301 302 func (x *benchmarkServiceStreamingFromClientServer) SendAndClose(m *SimpleResponse) error { 303 return x.ServerStream.SendMsg(m) 304 } 305 306 func (x *benchmarkServiceStreamingFromClientServer) Recv() (*SimpleRequest, error) { 307 m := new(SimpleRequest) 308 if err := x.ServerStream.RecvMsg(m); err != nil { 309 return nil, err 310 } 311 return m, nil 312 } 313 314 func _BenchmarkService_StreamingFromServer_Handler(srv interface{}, stream grpc.ServerStream) error { 315 m := new(SimpleRequest) 316 if err := stream.RecvMsg(m); err != nil { 317 return err 318 } 319 return srv.(BenchmarkServiceServer).StreamingFromServer(m, &benchmarkServiceStreamingFromServerServer{stream}) 320 } 321 322 type BenchmarkService_StreamingFromServerServer interface { 323 Send(*SimpleResponse) error 324 grpc.ServerStream 325 } 326 327 type benchmarkServiceStreamingFromServerServer struct { 328 grpc.ServerStream 329 } 330 331 func (x *benchmarkServiceStreamingFromServerServer) Send(m *SimpleResponse) error { 332 return x.ServerStream.SendMsg(m) 333 } 334 335 func _BenchmarkService_StreamingBothWays_Handler(srv interface{}, stream grpc.ServerStream) error { 336 return srv.(BenchmarkServiceServer).StreamingBothWays(&benchmarkServiceStreamingBothWaysServer{stream}) 337 } 338 339 type BenchmarkService_StreamingBothWaysServer interface { 340 Send(*SimpleResponse) error 341 Recv() (*SimpleRequest, error) 342 grpc.ServerStream 343 } 344 345 type benchmarkServiceStreamingBothWaysServer struct { 346 grpc.ServerStream 347 } 348 349 func (x *benchmarkServiceStreamingBothWaysServer) Send(m *SimpleResponse) error { 350 return x.ServerStream.SendMsg(m) 351 } 352 353 func (x *benchmarkServiceStreamingBothWaysServer) Recv() (*SimpleRequest, error) { 354 m := new(SimpleRequest) 355 if err := x.ServerStream.RecvMsg(m); err != nil { 356 return nil, err 357 } 358 return m, nil 359 } 360 361 // BenchmarkService_ServiceDesc is the grpc.ServiceDesc for BenchmarkService service. 362 // It's only intended for direct use with grpc.RegisterService, 363 // and not to be introspected or modified (even as a copy) 364 var BenchmarkService_ServiceDesc = grpc.ServiceDesc{ 365 ServiceName: "grpc.testing.BenchmarkService", 366 HandlerType: (*BenchmarkServiceServer)(nil), 367 Methods: []grpc.MethodDesc{ 368 { 369 MethodName: "UnaryCall", 370 Handler: _BenchmarkService_UnaryCall_Handler, 371 }, 372 }, 373 Streams: []grpc.StreamDesc{ 374 { 375 StreamName: "StreamingCall", 376 Handler: _BenchmarkService_StreamingCall_Handler, 377 ServerStreams: true, 378 ClientStreams: true, 379 }, 380 { 381 StreamName: "StreamingFromClient", 382 Handler: _BenchmarkService_StreamingFromClient_Handler, 383 ClientStreams: true, 384 }, 385 { 386 StreamName: "StreamingFromServer", 387 Handler: _BenchmarkService_StreamingFromServer_Handler, 388 ServerStreams: true, 389 }, 390 { 391 StreamName: "StreamingBothWays", 392 Handler: _BenchmarkService_StreamingBothWays_Handler, 393 ServerStreams: true, 394 ClientStreams: true, 395 }, 396 }, 397 Metadata: "grpc/testing/benchmark_service.proto", 398 }