• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Generated by the protocol buffer compiler.  DO NOT EDIT!
2# Source: src/proto/grpc/testing/benchmark_service.proto for package 'grpc.testing'
3# Original file comments:
4# Copyright 2015 gRPC authors.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10#     http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18# An integration test service that covers all the method signature permutations
19# of unary/streaming requests/responses.
20
21require 'grpc'
22require 'src/proto/grpc/testing/benchmark_service_pb'
23
24module Grpc
25  module Testing
26    module BenchmarkService
27      class Service
28
29        include GRPC::GenericService
30
31        self.marshal_class_method = :encode
32        self.unmarshal_class_method = :decode
33        self.service_name = 'grpc.testing.BenchmarkService'
34
35        # One request followed by one response.
36        # The server returns the client payload as-is.
37        rpc :UnaryCall, SimpleRequest, SimpleResponse
38        # Repeated sequence of one request followed by one response.
39        # Should be called streaming ping-pong
40        # The server returns the client payload as-is on each response
41        rpc :StreamingCall, stream(SimpleRequest), stream(SimpleResponse)
42        # Single-sided unbounded streaming from client to server
43        # The server returns the client payload as-is once the client does WritesDone
44        rpc :StreamingFromClient, stream(SimpleRequest), SimpleResponse
45        # Single-sided unbounded streaming from server to client
46        # The server repeatedly returns the client payload as-is
47        rpc :StreamingFromServer, SimpleRequest, stream(SimpleResponse)
48        # Two-sided unbounded streaming between server to client
49        # Both sides send the content of their own choice to the other
50        rpc :StreamingBothWays, stream(SimpleRequest), stream(SimpleResponse)
51      end
52
53      Stub = Service.rpc_stub_class
54    end
55  end
56end
57