• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Generated by the protocol buffer compiler.  DO NOT EDIT!
2# Source: src/proto/grpc/testing/worker_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/worker_service_pb'
23
24module Grpc
25  module Testing
26    module WorkerService
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.WorkerService'
34
35        # Start server with specified workload.
36        # First request sent specifies the ServerConfig followed by ServerStatus
37        # response. After that, a "Mark" can be sent anytime to request the latest
38        # stats. Closing the stream will initiate shutdown of the test server
39        # and once the shutdown has finished, the OK status is sent to terminate
40        # this RPC.
41        rpc :RunServer, stream(ServerArgs), stream(ServerStatus)
42        # Start client with specified workload.
43        # First request sent specifies the ClientConfig followed by ClientStatus
44        # response. After that, a "Mark" can be sent anytime to request the latest
45        # stats. Closing the stream will initiate shutdown of the test client
46        # and once the shutdown has finished, the OK status is sent to terminate
47        # this RPC.
48        rpc :RunClient, stream(ClientArgs), stream(ClientStatus)
49        # Just return the core count - unary call
50        rpc :CoreCount, CoreRequest, CoreResponse
51        # Quit this worker
52        rpc :QuitWorker, Void, Void
53      end
54
55      Stub = Service.rpc_stub_class
56    end
57  end
58end
59