blob: e205dea93ea1288ffe61dbc78606831102cf8839 [file] [log] [blame]
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -07001// Generated by the protocol buffer compiler. DO NOT EDIT!
Jan Tattermusch72ce4422016-01-20 13:54:38 -08002// source: src/proto/grpc/testing/services.proto
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07003// Original file comments:
4// Copyright 2015, Google Inc.
5// All rights reserved.
6//
7// Redistribution and use in source and binary forms, with or without
8// modification, are permitted provided that the following conditions are
9// met:
10//
11// * Redistributions of source code must retain the above copyright
12// notice, this list of conditions and the following disclaimer.
13// * Redistributions in binary form must reproduce the above
14// copyright notice, this list of conditions and the following disclaimer
15// in the documentation and/or other materials provided with the
16// distribution.
17// * Neither the name of Google Inc. nor the names of its
18// contributors may be used to endorse or promote products derived from
19// this software without specific prior written permission.
20//
21// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32//
33// An integration test service that covers all the method signature permutations
34// of unary/streaming requests/responses.
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070035#region Designer generated code
36
37using System;
38using System.Threading;
39using System.Threading.Tasks;
40using Grpc.Core;
41
42namespace Grpc.Testing {
43 public static class BenchmarkService
44 {
45 static readonly string __ServiceName = "grpc.testing.BenchmarkService";
46
47 static readonly Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom);
48 static readonly Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom);
49
50 static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
51 MethodType.Unary,
52 __ServiceName,
53 "UnaryCall",
54 __Marshaller_SimpleRequest,
55 __Marshaller_SimpleResponse);
56
57 static readonly Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingCall = new Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>(
58 MethodType.DuplexStreaming,
59 __ServiceName,
60 "StreamingCall",
61 __Marshaller_SimpleRequest,
62 __Marshaller_SimpleResponse);
63
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070064 /// <summary>Service descriptor</summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070065 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
66 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -080067 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[0]; }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070068 }
69
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070070 /// <summary>Base class for server-side implementations of BenchmarkService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070071 public abstract class BenchmarkServiceBase
72 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070073 /// <summary>
74 /// One request followed by one response.
75 /// The server returns the client payload as-is.
76 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -070077 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070078 {
79 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
80 }
81
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070082 /// <summary>
83 /// One request followed by one response.
84 /// The server returns the client payload as-is.
85 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -070086 public virtual global::System.Threading.Tasks.Task StreamingCall(IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070087 {
88 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
89 }
90
91 }
92
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070093 /// <summary>Client for BenchmarkService</summary>
Jan Tattermuschfcc8d972016-06-06 09:44:02 -070094 public class BenchmarkServiceClient : ClientBase<BenchmarkServiceClient>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070095 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -070096 /// <summary>Creates a new client for BenchmarkService</summary>
97 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -070098 public BenchmarkServiceClient(Channel channel) : base(channel)
99 {
100 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700101 /// <summary>Creates a new client for BenchmarkService that uses a custom <c>CallInvoker</c>.</summary>
102 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700103 public BenchmarkServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700104 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700105 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700106 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700107 protected BenchmarkServiceClient() : base()
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700108 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700109 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700110 /// <summary>Protected constructor to allow creation of configured clients.</summary>
111 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700112 protected BenchmarkServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700113 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700114 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700115
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700116 /// <summary>
117 /// One request followed by one response.
118 /// The server returns the client payload as-is.
119 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700120 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700121 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700122 return UnaryCall(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700123 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700124 /// <summary>
125 /// One request followed by one response.
126 /// The server returns the client payload as-is.
127 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700128 public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700129 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700130 return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700131 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700132 /// <summary>
133 /// One request followed by one response.
134 /// The server returns the client payload as-is.
135 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700136 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700137 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700138 return UnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken));
139 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700140 /// <summary>
141 /// One request followed by one response.
142 /// The server returns the client payload as-is.
143 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700144 public virtual AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options)
145 {
146 return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request);
147 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700148 /// <summary>
149 /// One request followed by one response.
150 /// The server returns the client payload as-is.
151 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700152 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
153 {
154 return StreamingCall(new CallOptions(headers, deadline, cancellationToken));
155 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700156 /// <summary>
157 /// One request followed by one response.
158 /// The server returns the client payload as-is.
159 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700160 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(CallOptions options)
161 {
162 return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingCall, null, options);
163 }
164 protected override BenchmarkServiceClient NewInstance(ClientBaseConfiguration configuration)
165 {
166 return new BenchmarkServiceClient(configuration);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700167 }
168 }
169
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700170 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700171 public static ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl)
172 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700173 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700174 .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall)
175 .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall).Build();
176 }
177
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700178 }
179 public static class WorkerService
180 {
181 static readonly string __ServiceName = "grpc.testing.WorkerService";
182
183 static readonly Marshaller<global::Grpc.Testing.ServerArgs> __Marshaller_ServerArgs = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerArgs.Parser.ParseFrom);
184 static readonly Marshaller<global::Grpc.Testing.ServerStatus> __Marshaller_ServerStatus = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerStatus.Parser.ParseFrom);
185 static readonly Marshaller<global::Grpc.Testing.ClientArgs> __Marshaller_ClientArgs = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientArgs.Parser.ParseFrom);
186 static readonly Marshaller<global::Grpc.Testing.ClientStatus> __Marshaller_ClientStatus = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientStatus.Parser.ParseFrom);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800187 static readonly Marshaller<global::Grpc.Testing.CoreRequest> __Marshaller_CoreRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreRequest.Parser.ParseFrom);
188 static readonly Marshaller<global::Grpc.Testing.CoreResponse> __Marshaller_CoreResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreResponse.Parser.ParseFrom);
189 static readonly Marshaller<global::Grpc.Testing.Void> __Marshaller_Void = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom);
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700190
191 static readonly Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> __Method_RunServer = new Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus>(
192 MethodType.DuplexStreaming,
193 __ServiceName,
194 "RunServer",
195 __Marshaller_ServerArgs,
196 __Marshaller_ServerStatus);
197
198 static readonly Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> __Method_RunClient = new Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus>(
199 MethodType.DuplexStreaming,
200 __ServiceName,
201 "RunClient",
202 __Marshaller_ClientArgs,
203 __Marshaller_ClientStatus);
204
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800205 static readonly Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse> __Method_CoreCount = new Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse>(
206 MethodType.Unary,
207 __ServiceName,
208 "CoreCount",
209 __Marshaller_CoreRequest,
210 __Marshaller_CoreResponse);
211
212 static readonly Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void> __Method_QuitWorker = new Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void>(
213 MethodType.Unary,
214 __ServiceName,
215 "QuitWorker",
216 __Marshaller_Void,
217 __Marshaller_Void);
218
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700219 /// <summary>Service descriptor</summary>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700220 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
221 {
Jan Tattermusch72ce4422016-01-20 13:54:38 -0800222 get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[1]; }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700223 }
224
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700225 /// <summary>Base class for server-side implementations of WorkerService</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700226 public abstract class WorkerServiceBase
227 {
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700228 /// <summary>
229 /// Start server with specified workload.
230 /// First request sent specifies the ServerConfig followed by ServerStatus
231 /// response. After that, a "Mark" can be sent anytime to request the latest
232 /// stats. Closing the stream will initiate shutdown of the test server
233 /// and once the shutdown has finished, the OK status is sent to terminate
234 /// this RPC.
235 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700236 public virtual global::System.Threading.Tasks.Task RunServer(IAsyncStreamReader<global::Grpc.Testing.ServerArgs> requestStream, IServerStreamWriter<global::Grpc.Testing.ServerStatus> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700237 {
238 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
239 }
240
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700241 /// <summary>
242 /// Start client with specified workload.
243 /// First request sent specifies the ClientConfig followed by ClientStatus
244 /// response. After that, a "Mark" can be sent anytime to request the latest
245 /// stats. Closing the stream will initiate shutdown of the test client
246 /// and once the shutdown has finished, the OK status is sent to terminate
247 /// this RPC.
248 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700249 public virtual global::System.Threading.Tasks.Task RunClient(IAsyncStreamReader<global::Grpc.Testing.ClientArgs> requestStream, IServerStreamWriter<global::Grpc.Testing.ClientStatus> responseStream, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700250 {
251 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
252 }
253
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700254 /// <summary>
255 /// Just return the core count - unary call
256 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700257 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.CoreResponse> CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700258 {
259 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
260 }
261
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700262 /// <summary>
263 /// Quit this worker
264 /// </summary>
Jan Tattermuschd83f7912016-05-09 10:28:10 -0700265 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700266 {
267 throw new RpcException(new Status(StatusCode.Unimplemented, ""));
268 }
269
270 }
271
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700272 /// <summary>Client for WorkerService</summary>
Jan Tattermuschfcc8d972016-06-06 09:44:02 -0700273 public class WorkerServiceClient : ClientBase<WorkerServiceClient>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700274 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700275 /// <summary>Creates a new client for WorkerService</summary>
276 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700277 public WorkerServiceClient(Channel channel) : base(channel)
278 {
279 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700280 /// <summary>Creates a new client for WorkerService that uses a custom <c>CallInvoker</c>.</summary>
281 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700282 public WorkerServiceClient(CallInvoker callInvoker) : base(callInvoker)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700283 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700284 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700285 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700286 protected WorkerServiceClient() : base()
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700287 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700288 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -0700289 /// <summary>Protected constructor to allow creation of configured clients.</summary>
290 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700291 protected WorkerServiceClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700292 {
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700293 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700294
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700295 /// <summary>
296 /// Start server with specified workload.
297 /// First request sent specifies the ServerConfig followed by ServerStatus
298 /// response. After that, a "Mark" can be sent anytime to request the latest
299 /// stats. Closing the stream will initiate shutdown of the test server
300 /// and once the shutdown has finished, the OK status is sent to terminate
301 /// this RPC.
302 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700303 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700304 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700305 return RunServer(new CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700306 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700307 /// <summary>
308 /// Start server with specified workload.
309 /// First request sent specifies the ServerConfig followed by ServerStatus
310 /// response. After that, a "Mark" can be sent anytime to request the latest
311 /// stats. Closing the stream will initiate shutdown of the test server
312 /// and once the shutdown has finished, the OK status is sent to terminate
313 /// this RPC.
314 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700315 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800316 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700317 return CallInvoker.AsyncDuplexStreamingCall(__Method_RunServer, null, options);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800318 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700319 /// <summary>
320 /// Start client with specified workload.
321 /// First request sent specifies the ClientConfig followed by ClientStatus
322 /// response. After that, a "Mark" can be sent anytime to request the latest
323 /// stats. Closing the stream will initiate shutdown of the test client
324 /// and once the shutdown has finished, the OK status is sent to terminate
325 /// this RPC.
326 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700327 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800328 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700329 return RunClient(new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800330 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700331 /// <summary>
332 /// Start client with specified workload.
333 /// First request sent specifies the ClientConfig followed by ClientStatus
334 /// response. After that, a "Mark" can be sent anytime to request the latest
335 /// stats. Closing the stream will initiate shutdown of the test client
336 /// and once the shutdown has finished, the OK status is sent to terminate
337 /// this RPC.
338 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700339 public virtual AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800340 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700341 return CallInvoker.AsyncDuplexStreamingCall(__Method_RunClient, null, options);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800342 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700343 /// <summary>
344 /// Just return the core count - unary call
345 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700346 public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800347 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700348 return CoreCount(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800349 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700350 /// <summary>
351 /// Just return the core count - unary call
352 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700353 public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800354 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700355 return CallInvoker.BlockingUnaryCall(__Method_CoreCount, null, options, request);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800356 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700357 /// <summary>
358 /// Just return the core count - unary call
359 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700360 public virtual AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800361 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700362 return CoreCountAsync(request, new CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800363 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700364 /// <summary>
365 /// Just return the core count - unary call
366 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700367 public virtual AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, CallOptions options)
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800368 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700369 return CallInvoker.AsyncUnaryCall(__Method_CoreCount, null, options, request);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800370 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700371 /// <summary>
372 /// Quit this worker
373 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700374 public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800375 {
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700376 return QuitWorker(request, new CallOptions(headers, deadline, cancellationToken));
377 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700378 /// <summary>
379 /// Quit this worker
380 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700381 public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, CallOptions options)
382 {
383 return CallInvoker.BlockingUnaryCall(__Method_QuitWorker, null, options, request);
384 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700385 /// <summary>
386 /// Quit this worker
387 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700388 public virtual AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
389 {
390 return QuitWorkerAsync(request, new CallOptions(headers, deadline, cancellationToken));
391 }
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700392 /// <summary>
393 /// Quit this worker
394 /// </summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -0700395 public virtual AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, CallOptions options)
396 {
397 return CallInvoker.AsyncUnaryCall(__Method_QuitWorker, null, options, request);
398 }
399 protected override WorkerServiceClient NewInstance(ClientBaseConfiguration configuration)
400 {
401 return new WorkerServiceClient(configuration);
Jan Tattermusch1cbb5672016-02-18 14:27:28 -0800402 }
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700403 }
404
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700405 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700406 public static ServerServiceDefinition BindService(WorkerServiceBase serviceImpl)
407 {
Jan Tattermusch562cd052016-06-06 08:47:17 -0700408 return ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700409 .AddMethod(__Method_RunServer, serviceImpl.RunServer)
410 .AddMethod(__Method_RunClient, serviceImpl.RunClient)
411 .AddMethod(__Method_CoreCount, serviceImpl.CoreCount)
412 .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build();
413 }
414
Jan Tattermuschd0c1bfa2015-10-22 19:14:57 -0700415 }
416}
417#endregion