OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / grpc / benchmark / grpc_testing / services.proto
1 // Copyright 2016 gRPC authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // An integration test service that covers all the method signature permutations
16 // of unary/streaming requests/responses.
17 syntax = "proto3";
18
19 import "messages.proto";
20 import "control.proto";
21
22 package grpc.testing;
23
24 service BenchmarkService {
25   // One request followed by one response.
26   // The server returns the client payload as-is.
27   rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
28
29   // One request followed by one response.
30   // The server returns the client payload as-is.
31   rpc StreamingCall(stream SimpleRequest) returns (stream SimpleResponse);
32 }
33
34 service WorkerService {
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) returns (stream ServerStatus);
42
43   // Start client with specified workload.
44   // First request sent specifies the ClientConfig followed by ClientStatus
45   // response. After that, a "Mark" can be sent anytime to request the latest
46   // stats. Closing the stream will initiate shutdown of the test client
47   // and once the shutdown has finished, the OK status is sent to terminate
48   // this RPC.
49   rpc RunClient(stream ClientArgs) returns (stream ClientStatus);
50
51   // Just return the core count - unary call
52   rpc CoreCount(CoreRequest) returns (CoreResponse);
53
54   // Quit this worker
55   rpc QuitWorker(Void) returns (Void);
56 }