mirror of https://github.com/grpc/grpc.git
Merge pull request #15107 from kpayson64/break_out_protos
Break qps services into seperate protospull/15130/head
commit
aba91966c0
83 changed files with 3735 additions and 1029 deletions
@ -0,0 +1,46 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: src/proto/grpc/testing/benchmark_service.proto |
||||
#pragma warning disable 1591, 0612, 3021 |
||||
#region Designer generated code |
||||
|
||||
using pb = global::Google.Protobuf; |
||||
using pbc = global::Google.Protobuf.Collections; |
||||
using pbr = global::Google.Protobuf.Reflection; |
||||
using scg = global::System.Collections.Generic; |
||||
namespace Grpc.Testing { |
||||
|
||||
/// <summary>Holder for reflection information generated from src/proto/grpc/testing/benchmark_service.proto</summary> |
||||
public static partial class BenchmarkServiceReflection { |
||||
|
||||
#region Descriptor |
||||
/// <summary>File descriptor for src/proto/grpc/testing/benchmark_service.proto</summary> |
||||
public static pbr::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbr::FileDescriptor descriptor; |
||||
|
||||
static BenchmarkServiceReflection() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
string.Concat( |
||||
"Ci5zcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL2JlbmNobWFya19zZXJ2aWNlLnBy", |
||||
"b3RvEgxncnBjLnRlc3RpbmcaJXNyYy9wcm90by9ncnBjL3Rlc3RpbmcvbWVz", |
||||
"c2FnZXMucHJvdG8ypgMKEEJlbmNobWFya1NlcnZpY2USRgoJVW5hcnlDYWxs", |
||||
"EhsuZ3JwYy50ZXN0aW5nLlNpbXBsZVJlcXVlc3QaHC5ncnBjLnRlc3Rpbmcu", |
||||
"U2ltcGxlUmVzcG9uc2USTgoNU3RyZWFtaW5nQ2FsbBIbLmdycGMudGVzdGlu", |
||||
"Zy5TaW1wbGVSZXF1ZXN0GhwuZ3JwYy50ZXN0aW5nLlNpbXBsZVJlc3BvbnNl", |
||||
"KAEwARJSChNTdHJlYW1pbmdGcm9tQ2xpZW50EhsuZ3JwYy50ZXN0aW5nLlNp", |
||||
"bXBsZVJlcXVlc3QaHC5ncnBjLnRlc3RpbmcuU2ltcGxlUmVzcG9uc2UoARJS", |
||||
"ChNTdHJlYW1pbmdGcm9tU2VydmVyEhsuZ3JwYy50ZXN0aW5nLlNpbXBsZVJl", |
||||
"cXVlc3QaHC5ncnBjLnRlc3RpbmcuU2ltcGxlUmVzcG9uc2UwARJSChFTdHJl", |
||||
"YW1pbmdCb3RoV2F5cxIbLmdycGMudGVzdGluZy5TaW1wbGVSZXF1ZXN0Ghwu", |
||||
"Z3JwYy50ZXN0aW5nLlNpbXBsZVJlc3BvbnNlKAEwAWIGcHJvdG8z")); |
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
||||
new pbr::FileDescriptor[] { global::Grpc.Testing.MessagesReflection.Descriptor, }, |
||||
new pbr::GeneratedClrTypeInfo(null, null)); |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
} |
||||
|
||||
#endregion Designer generated code |
@ -0,0 +1,329 @@ |
||||
// <auto-generated> |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: src/proto/grpc/testing/benchmark_service.proto |
||||
// </auto-generated> |
||||
// Original file comments: |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
#pragma warning disable 1591 |
||||
#region Designer generated code |
||||
|
||||
using grpc = global::Grpc.Core; |
||||
|
||||
namespace Grpc.Testing { |
||||
public static partial class BenchmarkService |
||||
{ |
||||
static readonly string __ServiceName = "grpc.testing.BenchmarkService"; |
||||
|
||||
static readonly grpc::Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
||||
grpc::MethodType.Unary, |
||||
__ServiceName, |
||||
"UnaryCall", |
||||
__Marshaller_SimpleRequest, |
||||
__Marshaller_SimpleResponse); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingCall = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
||||
grpc::MethodType.DuplexStreaming, |
||||
__ServiceName, |
||||
"StreamingCall", |
||||
__Marshaller_SimpleRequest, |
||||
__Marshaller_SimpleResponse); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingFromClient = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
||||
grpc::MethodType.ClientStreaming, |
||||
__ServiceName, |
||||
"StreamingFromClient", |
||||
__Marshaller_SimpleRequest, |
||||
__Marshaller_SimpleResponse); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingFromServer = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
||||
grpc::MethodType.ServerStreaming, |
||||
__ServiceName, |
||||
"StreamingFromServer", |
||||
__Marshaller_SimpleRequest, |
||||
__Marshaller_SimpleResponse); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingBothWays = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
||||
grpc::MethodType.DuplexStreaming, |
||||
__ServiceName, |
||||
"StreamingBothWays", |
||||
__Marshaller_SimpleRequest, |
||||
__Marshaller_SimpleResponse); |
||||
|
||||
/// <summary>Service descriptor</summary> |
||||
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
||||
{ |
||||
get { return global::Grpc.Testing.BenchmarkServiceReflection.Descriptor.Services[0]; } |
||||
} |
||||
|
||||
/// <summary>Base class for server-side implementations of BenchmarkService</summary> |
||||
public abstract partial class BenchmarkServiceBase |
||||
{ |
||||
/// <summary> |
||||
/// One request followed by one response. |
||||
/// The server returns the client payload as-is. |
||||
/// </summary> |
||||
/// <param name="request">The request received from the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
||||
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Repeated sequence of one request followed by one response. |
||||
/// Should be called streaming ping-pong |
||||
/// The server returns the client payload as-is on each response |
||||
/// </summary> |
||||
/// <param name="requestStream">Used for reading requests from the client.</param> |
||||
/// <param name="responseStream">Used for sending responses back to the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>A task indicating completion of the handler.</returns> |
||||
public virtual global::System.Threading.Tasks.Task StreamingCall(grpc::IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from client to server |
||||
/// The server returns the client payload as-is once the client does WritesDone |
||||
/// </summary> |
||||
/// <param name="requestStream">Used for reading requests from the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
||||
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from server to client |
||||
/// The server repeatedly returns the client payload as-is |
||||
/// </summary> |
||||
/// <param name="request">The request received from the client.</param> |
||||
/// <param name="responseStream">Used for sending responses back to the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>A task indicating completion of the handler.</returns> |
||||
public virtual global::System.Threading.Tasks.Task StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Two-sided unbounded streaming between server to client |
||||
/// Both sides send the content of their own choice to the other |
||||
/// </summary> |
||||
/// <param name="requestStream">Used for reading requests from the client.</param> |
||||
/// <param name="responseStream">Used for sending responses back to the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>A task indicating completion of the handler.</returns> |
||||
public virtual global::System.Threading.Tasks.Task StreamingBothWays(grpc::IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
} |
||||
|
||||
/// <summary>Client for BenchmarkService</summary> |
||||
public partial class BenchmarkServiceClient : grpc::ClientBase<BenchmarkServiceClient> |
||||
{ |
||||
/// <summary>Creates a new client for BenchmarkService</summary> |
||||
/// <param name="channel">The channel to use to make remote calls.</param> |
||||
public BenchmarkServiceClient(grpc::Channel channel) : base(channel) |
||||
{ |
||||
} |
||||
/// <summary>Creates a new client for BenchmarkService that uses a custom <c>CallInvoker</c>.</summary> |
||||
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param> |
||||
public BenchmarkServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
||||
{ |
||||
} |
||||
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
||||
protected BenchmarkServiceClient() : base() |
||||
{ |
||||
} |
||||
/// <summary>Protected constructor to allow creation of configured clients.</summary> |
||||
/// <param name="configuration">The client configuration.</param> |
||||
protected BenchmarkServiceClient(ClientBaseConfiguration configuration) : base(configuration) |
||||
{ |
||||
} |
||||
|
||||
/// <summary> |
||||
/// One request followed by one response. |
||||
/// The server returns the client payload as-is. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return UnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// One request followed by one response. |
||||
/// The server returns the client payload as-is. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// One request followed by one response. |
||||
/// The server returns the client payload as-is. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return UnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// One request followed by one response. |
||||
/// The server returns the client payload as-is. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Repeated sequence of one request followed by one response. |
||||
/// Should be called streaming ping-pong |
||||
/// The server returns the client payload as-is on each response |
||||
/// </summary> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return StreamingCall(new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Repeated sequence of one request followed by one response. |
||||
/// Should be called streaming ping-pong |
||||
/// The server returns the client payload as-is on each response |
||||
/// </summary> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingCall, null, options); |
||||
} |
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from client to server |
||||
/// The server returns the client payload as-is once the client does WritesDone |
||||
/// </summary> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return StreamingFromClient(new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from client to server |
||||
/// The server returns the client payload as-is once the client does WritesDone |
||||
/// </summary> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncClientStreamingCall(__Method_StreamingFromClient, null, options); |
||||
} |
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from server to client |
||||
/// The server repeatedly returns the client payload as-is |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.SimpleResponse> StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return StreamingFromServer(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from server to client |
||||
/// The server repeatedly returns the client payload as-is |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.SimpleResponse> StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncServerStreamingCall(__Method_StreamingFromServer, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Two-sided unbounded streaming between server to client |
||||
/// Both sides send the content of their own choice to the other |
||||
/// </summary> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingBothWays(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return StreamingBothWays(new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Two-sided unbounded streaming between server to client |
||||
/// Both sides send the content of their own choice to the other |
||||
/// </summary> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingBothWays(grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingBothWays, null, options); |
||||
} |
||||
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
||||
protected override BenchmarkServiceClient NewInstance(ClientBaseConfiguration configuration) |
||||
{ |
||||
return new BenchmarkServiceClient(configuration); |
||||
} |
||||
} |
||||
|
||||
/// <summary>Creates service definition that can be registered with a server</summary> |
||||
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
||||
public static grpc::ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl) |
||||
{ |
||||
return grpc::ServerServiceDefinition.CreateBuilder() |
||||
.AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) |
||||
.AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall) |
||||
.AddMethod(__Method_StreamingFromClient, serviceImpl.StreamingFromClient) |
||||
.AddMethod(__Method_StreamingFromServer, serviceImpl.StreamingFromServer) |
||||
.AddMethod(__Method_StreamingBothWays, serviceImpl.StreamingBothWays).Build(); |
||||
} |
||||
|
||||
} |
||||
} |
||||
#endregion |
@ -0,0 +1,39 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: src/proto/grpc/testing/report_qps_scenario_service.proto |
||||
#pragma warning disable 1591, 0612, 3021 |
||||
#region Designer generated code |
||||
|
||||
using pb = global::Google.Protobuf; |
||||
using pbc = global::Google.Protobuf.Collections; |
||||
using pbr = global::Google.Protobuf.Reflection; |
||||
using scg = global::System.Collections.Generic; |
||||
namespace Grpc.Testing { |
||||
|
||||
/// <summary>Holder for reflection information generated from src/proto/grpc/testing/report_qps_scenario_service.proto</summary> |
||||
public static partial class ReportQpsScenarioServiceReflection { |
||||
|
||||
#region Descriptor |
||||
/// <summary>File descriptor for src/proto/grpc/testing/report_qps_scenario_service.proto</summary> |
||||
public static pbr::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbr::FileDescriptor descriptor; |
||||
|
||||
static ReportQpsScenarioServiceReflection() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
string.Concat( |
||||
"CjhzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3JlcG9ydF9xcHNfc2NlbmFyaW9f", |
||||
"c2VydmljZS5wcm90bxIMZ3JwYy50ZXN0aW5nGiRzcmMvcHJvdG8vZ3JwYy90", |
||||
"ZXN0aW5nL2NvbnRyb2wucHJvdG8yXgoYUmVwb3J0UXBzU2NlbmFyaW9TZXJ2", |
||||
"aWNlEkIKDlJlcG9ydFNjZW5hcmlvEhwuZ3JwYy50ZXN0aW5nLlNjZW5hcmlv", |
||||
"UmVzdWx0GhIuZ3JwYy50ZXN0aW5nLlZvaWRiBnByb3RvMw==")); |
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
||||
new pbr::FileDescriptor[] { global::Grpc.Testing.ControlReflection.Descriptor, }, |
||||
new pbr::GeneratedClrTypeInfo(null, null)); |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
} |
||||
|
||||
#endregion Designer generated code |
@ -0,0 +1,148 @@ |
||||
// <auto-generated> |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: src/proto/grpc/testing/report_qps_scenario_service.proto |
||||
// </auto-generated> |
||||
// Original file comments: |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
#pragma warning disable 1591 |
||||
#region Designer generated code |
||||
|
||||
using grpc = global::Grpc.Core; |
||||
|
||||
namespace Grpc.Testing { |
||||
public static partial class ReportQpsScenarioService |
||||
{ |
||||
static readonly string __ServiceName = "grpc.testing.ReportQpsScenarioService"; |
||||
|
||||
static readonly grpc::Marshaller<global::Grpc.Testing.ScenarioResult> __Marshaller_ScenarioResult = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ScenarioResult.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.Void> __Marshaller_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void> __Method_ReportScenario = new grpc::Method<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void>( |
||||
grpc::MethodType.Unary, |
||||
__ServiceName, |
||||
"ReportScenario", |
||||
__Marshaller_ScenarioResult, |
||||
__Marshaller_Void); |
||||
|
||||
/// <summary>Service descriptor</summary> |
||||
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
||||
{ |
||||
get { return global::Grpc.Testing.ReportQpsScenarioServiceReflection.Descriptor.Services[0]; } |
||||
} |
||||
|
||||
/// <summary>Base class for server-side implementations of ReportQpsScenarioService</summary> |
||||
public abstract partial class ReportQpsScenarioServiceBase |
||||
{ |
||||
/// <summary> |
||||
/// Report results of a QPS test benchmark scenario. |
||||
/// </summary> |
||||
/// <param name="request">The request received from the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
||||
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
} |
||||
|
||||
/// <summary>Client for ReportQpsScenarioService</summary> |
||||
public partial class ReportQpsScenarioServiceClient : grpc::ClientBase<ReportQpsScenarioServiceClient> |
||||
{ |
||||
/// <summary>Creates a new client for ReportQpsScenarioService</summary> |
||||
/// <param name="channel">The channel to use to make remote calls.</param> |
||||
public ReportQpsScenarioServiceClient(grpc::Channel channel) : base(channel) |
||||
{ |
||||
} |
||||
/// <summary>Creates a new client for ReportQpsScenarioService that uses a custom <c>CallInvoker</c>.</summary> |
||||
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param> |
||||
public ReportQpsScenarioServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
||||
{ |
||||
} |
||||
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
||||
protected ReportQpsScenarioServiceClient() : base() |
||||
{ |
||||
} |
||||
/// <summary>Protected constructor to allow creation of configured clients.</summary> |
||||
/// <param name="configuration">The client configuration.</param> |
||||
protected ReportQpsScenarioServiceClient(ClientBaseConfiguration configuration) : base(configuration) |
||||
{ |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Report results of a QPS test benchmark scenario. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return ReportScenario(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Report results of a QPS test benchmark scenario. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.BlockingUnaryCall(__Method_ReportScenario, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Report results of a QPS test benchmark scenario. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return ReportScenarioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Report results of a QPS test benchmark scenario. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncUnaryCall(__Method_ReportScenario, null, options, request); |
||||
} |
||||
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
||||
protected override ReportQpsScenarioServiceClient NewInstance(ClientBaseConfiguration configuration) |
||||
{ |
||||
return new ReportQpsScenarioServiceClient(configuration); |
||||
} |
||||
} |
||||
|
||||
/// <summary>Creates service definition that can be registered with a server</summary> |
||||
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
||||
public static grpc::ServerServiceDefinition BindService(ReportQpsScenarioServiceBase serviceImpl) |
||||
{ |
||||
return grpc::ServerServiceDefinition.CreateBuilder() |
||||
.AddMethod(__Method_ReportScenario, serviceImpl.ReportScenario).Build(); |
||||
} |
||||
|
||||
} |
||||
} |
||||
#endregion |
@ -1,55 +0,0 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: src/proto/grpc/testing/services.proto |
||||
#pragma warning disable 1591, 0612, 3021 |
||||
#region Designer generated code |
||||
|
||||
using pb = global::Google.Protobuf; |
||||
using pbc = global::Google.Protobuf.Collections; |
||||
using pbr = global::Google.Protobuf.Reflection; |
||||
using scg = global::System.Collections.Generic; |
||||
namespace Grpc.Testing { |
||||
|
||||
/// <summary>Holder for reflection information generated from src/proto/grpc/testing/services.proto</summary> |
||||
public static partial class ServicesReflection { |
||||
|
||||
#region Descriptor |
||||
/// <summary>File descriptor for src/proto/grpc/testing/services.proto</summary> |
||||
public static pbr::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbr::FileDescriptor descriptor; |
||||
|
||||
static ServicesReflection() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
string.Concat( |
||||
"CiVzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3NlcnZpY2VzLnByb3RvEgxncnBj", |
||||
"LnRlc3RpbmcaJXNyYy9wcm90by9ncnBjL3Rlc3RpbmcvbWVzc2FnZXMucHJv", |
||||
"dG8aJHNyYy9wcm90by9ncnBjL3Rlc3RpbmcvY29udHJvbC5wcm90bzKmAwoQ", |
||||
"QmVuY2htYXJrU2VydmljZRJGCglVbmFyeUNhbGwSGy5ncnBjLnRlc3Rpbmcu", |
||||
"U2ltcGxlUmVxdWVzdBocLmdycGMudGVzdGluZy5TaW1wbGVSZXNwb25zZRJO", |
||||
"Cg1TdHJlYW1pbmdDYWxsEhsuZ3JwYy50ZXN0aW5nLlNpbXBsZVJlcXVlc3Qa", |
||||
"HC5ncnBjLnRlc3RpbmcuU2ltcGxlUmVzcG9uc2UoATABElIKE1N0cmVhbWlu", |
||||
"Z0Zyb21DbGllbnQSGy5ncnBjLnRlc3RpbmcuU2ltcGxlUmVxdWVzdBocLmdy", |
||||
"cGMudGVzdGluZy5TaW1wbGVSZXNwb25zZSgBElIKE1N0cmVhbWluZ0Zyb21T", |
||||
"ZXJ2ZXISGy5ncnBjLnRlc3RpbmcuU2ltcGxlUmVxdWVzdBocLmdycGMudGVz", |
||||
"dGluZy5TaW1wbGVSZXNwb25zZTABElIKEVN0cmVhbWluZ0JvdGhXYXlzEhsu", |
||||
"Z3JwYy50ZXN0aW5nLlNpbXBsZVJlcXVlc3QaHC5ncnBjLnRlc3RpbmcuU2lt", |
||||
"cGxlUmVzcG9uc2UoATABMpcCCg1Xb3JrZXJTZXJ2aWNlEkUKCVJ1blNlcnZl", |
||||
"chIYLmdycGMudGVzdGluZy5TZXJ2ZXJBcmdzGhouZ3JwYy50ZXN0aW5nLlNl", |
||||
"cnZlclN0YXR1cygBMAESRQoJUnVuQ2xpZW50EhguZ3JwYy50ZXN0aW5nLkNs", |
||||
"aWVudEFyZ3MaGi5ncnBjLnRlc3RpbmcuQ2xpZW50U3RhdHVzKAEwARJCCglD", |
||||
"b3JlQ291bnQSGS5ncnBjLnRlc3RpbmcuQ29yZVJlcXVlc3QaGi5ncnBjLnRl", |
||||
"c3RpbmcuQ29yZVJlc3BvbnNlEjQKClF1aXRXb3JrZXISEi5ncnBjLnRlc3Rp", |
||||
"bmcuVm9pZBoSLmdycGMudGVzdGluZy5Wb2lkMl4KGFJlcG9ydFFwc1NjZW5h", |
||||
"cmlvU2VydmljZRJCCg5SZXBvcnRTY2VuYXJpbxIcLmdycGMudGVzdGluZy5T", |
||||
"Y2VuYXJpb1Jlc3VsdBoSLmdycGMudGVzdGluZy5Wb2lkYgZwcm90bzM=")); |
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
||||
new pbr::FileDescriptor[] { global::Grpc.Testing.MessagesReflection.Descriptor, global::Grpc.Testing.ControlReflection.Descriptor, }, |
||||
new pbr::GeneratedClrTypeInfo(null, null)); |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
} |
||||
|
||||
#endregion Designer generated code |
@ -1,745 +0,0 @@ |
||||
// <auto-generated> |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: src/proto/grpc/testing/services.proto |
||||
// </auto-generated> |
||||
// Original file comments: |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
#pragma warning disable 1591 |
||||
#region Designer generated code |
||||
|
||||
using grpc = global::Grpc.Core; |
||||
|
||||
namespace Grpc.Testing { |
||||
public static partial class BenchmarkService |
||||
{ |
||||
static readonly string __ServiceName = "grpc.testing.BenchmarkService"; |
||||
|
||||
static readonly grpc::Marshaller<global::Grpc.Testing.SimpleRequest> __Marshaller_SimpleRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleRequest.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.SimpleResponse> __Marshaller_SimpleResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.SimpleResponse.Parser.ParseFrom); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_UnaryCall = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
||||
grpc::MethodType.Unary, |
||||
__ServiceName, |
||||
"UnaryCall", |
||||
__Marshaller_SimpleRequest, |
||||
__Marshaller_SimpleResponse); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingCall = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
||||
grpc::MethodType.DuplexStreaming, |
||||
__ServiceName, |
||||
"StreamingCall", |
||||
__Marshaller_SimpleRequest, |
||||
__Marshaller_SimpleResponse); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingFromClient = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
||||
grpc::MethodType.ClientStreaming, |
||||
__ServiceName, |
||||
"StreamingFromClient", |
||||
__Marshaller_SimpleRequest, |
||||
__Marshaller_SimpleResponse); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingFromServer = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
||||
grpc::MethodType.ServerStreaming, |
||||
__ServiceName, |
||||
"StreamingFromServer", |
||||
__Marshaller_SimpleRequest, |
||||
__Marshaller_SimpleResponse); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> __Method_StreamingBothWays = new grpc::Method<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse>( |
||||
grpc::MethodType.DuplexStreaming, |
||||
__ServiceName, |
||||
"StreamingBothWays", |
||||
__Marshaller_SimpleRequest, |
||||
__Marshaller_SimpleResponse); |
||||
|
||||
/// <summary>Service descriptor</summary> |
||||
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
||||
{ |
||||
get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[0]; } |
||||
} |
||||
|
||||
/// <summary>Base class for server-side implementations of BenchmarkService</summary> |
||||
public abstract partial class BenchmarkServiceBase |
||||
{ |
||||
/// <summary> |
||||
/// One request followed by one response. |
||||
/// The server returns the client payload as-is. |
||||
/// </summary> |
||||
/// <param name="request">The request received from the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
||||
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Repeated sequence of one request followed by one response. |
||||
/// Should be called streaming ping-pong |
||||
/// The server returns the client payload as-is on each response |
||||
/// </summary> |
||||
/// <param name="requestStream">Used for reading requests from the client.</param> |
||||
/// <param name="responseStream">Used for sending responses back to the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>A task indicating completion of the handler.</returns> |
||||
public virtual global::System.Threading.Tasks.Task StreamingCall(grpc::IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from client to server |
||||
/// The server returns the client payload as-is once the client does WritesDone |
||||
/// </summary> |
||||
/// <param name="requestStream">Used for reading requests from the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
||||
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from server to client |
||||
/// The server repeatedly returns the client payload as-is |
||||
/// </summary> |
||||
/// <param name="request">The request received from the client.</param> |
||||
/// <param name="responseStream">Used for sending responses back to the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>A task indicating completion of the handler.</returns> |
||||
public virtual global::System.Threading.Tasks.Task StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Two-sided unbounded streaming between server to client |
||||
/// Both sides send the content of their own choice to the other |
||||
/// </summary> |
||||
/// <param name="requestStream">Used for reading requests from the client.</param> |
||||
/// <param name="responseStream">Used for sending responses back to the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>A task indicating completion of the handler.</returns> |
||||
public virtual global::System.Threading.Tasks.Task StreamingBothWays(grpc::IAsyncStreamReader<global::Grpc.Testing.SimpleRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.SimpleResponse> responseStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
} |
||||
|
||||
/// <summary>Client for BenchmarkService</summary> |
||||
public partial class BenchmarkServiceClient : grpc::ClientBase<BenchmarkServiceClient> |
||||
{ |
||||
/// <summary>Creates a new client for BenchmarkService</summary> |
||||
/// <param name="channel">The channel to use to make remote calls.</param> |
||||
public BenchmarkServiceClient(grpc::Channel channel) : base(channel) |
||||
{ |
||||
} |
||||
/// <summary>Creates a new client for BenchmarkService that uses a custom <c>CallInvoker</c>.</summary> |
||||
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param> |
||||
public BenchmarkServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
||||
{ |
||||
} |
||||
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
||||
protected BenchmarkServiceClient() : base() |
||||
{ |
||||
} |
||||
/// <summary>Protected constructor to allow creation of configured clients.</summary> |
||||
/// <param name="configuration">The client configuration.</param> |
||||
protected BenchmarkServiceClient(ClientBaseConfiguration configuration) : base(configuration) |
||||
{ |
||||
} |
||||
|
||||
/// <summary> |
||||
/// One request followed by one response. |
||||
/// The server returns the client payload as-is. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return UnaryCall(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// One request followed by one response. |
||||
/// The server returns the client payload as-is. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// One request followed by one response. |
||||
/// The server returns the client payload as-is. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return UnaryCallAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// One request followed by one response. |
||||
/// The server returns the client payload as-is. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.SimpleResponse> UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Repeated sequence of one request followed by one response. |
||||
/// Should be called streaming ping-pong |
||||
/// The server returns the client payload as-is on each response |
||||
/// </summary> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return StreamingCall(new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Repeated sequence of one request followed by one response. |
||||
/// Should be called streaming ping-pong |
||||
/// The server returns the client payload as-is on each response |
||||
/// </summary> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingCall(grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingCall, null, options); |
||||
} |
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from client to server |
||||
/// The server returns the client payload as-is once the client does WritesDone |
||||
/// </summary> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return StreamingFromClient(new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from client to server |
||||
/// The server returns the client payload as-is once the client does WritesDone |
||||
/// </summary> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncClientStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingFromClient(grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncClientStreamingCall(__Method_StreamingFromClient, null, options); |
||||
} |
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from server to client |
||||
/// The server repeatedly returns the client payload as-is |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.SimpleResponse> StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return StreamingFromServer(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Single-sided unbounded streaming from server to client |
||||
/// The server repeatedly returns the client payload as-is |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncServerStreamingCall<global::Grpc.Testing.SimpleResponse> StreamingFromServer(global::Grpc.Testing.SimpleRequest request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncServerStreamingCall(__Method_StreamingFromServer, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Two-sided unbounded streaming between server to client |
||||
/// Both sides send the content of their own choice to the other |
||||
/// </summary> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingBothWays(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return StreamingBothWays(new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Two-sided unbounded streaming between server to client |
||||
/// Both sides send the content of their own choice to the other |
||||
/// </summary> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.SimpleRequest, global::Grpc.Testing.SimpleResponse> StreamingBothWays(grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingBothWays, null, options); |
||||
} |
||||
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
||||
protected override BenchmarkServiceClient NewInstance(ClientBaseConfiguration configuration) |
||||
{ |
||||
return new BenchmarkServiceClient(configuration); |
||||
} |
||||
} |
||||
|
||||
/// <summary>Creates service definition that can be registered with a server</summary> |
||||
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
||||
public static grpc::ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl) |
||||
{ |
||||
return grpc::ServerServiceDefinition.CreateBuilder() |
||||
.AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) |
||||
.AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall) |
||||
.AddMethod(__Method_StreamingFromClient, serviceImpl.StreamingFromClient) |
||||
.AddMethod(__Method_StreamingFromServer, serviceImpl.StreamingFromServer) |
||||
.AddMethod(__Method_StreamingBothWays, serviceImpl.StreamingBothWays).Build(); |
||||
} |
||||
|
||||
} |
||||
public static partial class WorkerService |
||||
{ |
||||
static readonly string __ServiceName = "grpc.testing.WorkerService"; |
||||
|
||||
static readonly grpc::Marshaller<global::Grpc.Testing.ServerArgs> __Marshaller_ServerArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerArgs.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.ServerStatus> __Marshaller_ServerStatus = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerStatus.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.ClientArgs> __Marshaller_ClientArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientArgs.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.ClientStatus> __Marshaller_ClientStatus = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientStatus.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.CoreRequest> __Marshaller_CoreRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreRequest.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.CoreResponse> __Marshaller_CoreResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreResponse.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.Void> __Marshaller_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> __Method_RunServer = new grpc::Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus>( |
||||
grpc::MethodType.DuplexStreaming, |
||||
__ServiceName, |
||||
"RunServer", |
||||
__Marshaller_ServerArgs, |
||||
__Marshaller_ServerStatus); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> __Method_RunClient = new grpc::Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus>( |
||||
grpc::MethodType.DuplexStreaming, |
||||
__ServiceName, |
||||
"RunClient", |
||||
__Marshaller_ClientArgs, |
||||
__Marshaller_ClientStatus); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse> __Method_CoreCount = new grpc::Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse>( |
||||
grpc::MethodType.Unary, |
||||
__ServiceName, |
||||
"CoreCount", |
||||
__Marshaller_CoreRequest, |
||||
__Marshaller_CoreResponse); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void> __Method_QuitWorker = new grpc::Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void>( |
||||
grpc::MethodType.Unary, |
||||
__ServiceName, |
||||
"QuitWorker", |
||||
__Marshaller_Void, |
||||
__Marshaller_Void); |
||||
|
||||
/// <summary>Service descriptor</summary> |
||||
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
||||
{ |
||||
get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[1]; } |
||||
} |
||||
|
||||
/// <summary>Base class for server-side implementations of WorkerService</summary> |
||||
public abstract partial class WorkerServiceBase |
||||
{ |
||||
/// <summary> |
||||
/// Start server with specified workload. |
||||
/// First request sent specifies the ServerConfig followed by ServerStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test server |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="requestStream">Used for reading requests from the client.</param> |
||||
/// <param name="responseStream">Used for sending responses back to the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>A task indicating completion of the handler.</returns> |
||||
public virtual global::System.Threading.Tasks.Task RunServer(grpc::IAsyncStreamReader<global::Grpc.Testing.ServerArgs> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.ServerStatus> responseStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Start client with specified workload. |
||||
/// First request sent specifies the ClientConfig followed by ClientStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test client |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="requestStream">Used for reading requests from the client.</param> |
||||
/// <param name="responseStream">Used for sending responses back to the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>A task indicating completion of the handler.</returns> |
||||
public virtual global::System.Threading.Tasks.Task RunClient(grpc::IAsyncStreamReader<global::Grpc.Testing.ClientArgs> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.ClientStatus> responseStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Just return the core count - unary call |
||||
/// </summary> |
||||
/// <param name="request">The request received from the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
||||
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.CoreResponse> CoreCount(global::Grpc.Testing.CoreRequest request, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Quit this worker |
||||
/// </summary> |
||||
/// <param name="request">The request received from the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
||||
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> QuitWorker(global::Grpc.Testing.Void request, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
} |
||||
|
||||
/// <summary>Client for WorkerService</summary> |
||||
public partial class WorkerServiceClient : grpc::ClientBase<WorkerServiceClient> |
||||
{ |
||||
/// <summary>Creates a new client for WorkerService</summary> |
||||
/// <param name="channel">The channel to use to make remote calls.</param> |
||||
public WorkerServiceClient(grpc::Channel channel) : base(channel) |
||||
{ |
||||
} |
||||
/// <summary>Creates a new client for WorkerService that uses a custom <c>CallInvoker</c>.</summary> |
||||
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param> |
||||
public WorkerServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
||||
{ |
||||
} |
||||
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
||||
protected WorkerServiceClient() : base() |
||||
{ |
||||
} |
||||
/// <summary>Protected constructor to allow creation of configured clients.</summary> |
||||
/// <param name="configuration">The client configuration.</param> |
||||
protected WorkerServiceClient(ClientBaseConfiguration configuration) : base(configuration) |
||||
{ |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Start server with specified workload. |
||||
/// First request sent specifies the ServerConfig followed by ServerStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test server |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return RunServer(new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Start server with specified workload. |
||||
/// First request sent specifies the ServerConfig followed by ServerStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test server |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncDuplexStreamingCall(__Method_RunServer, null, options); |
||||
} |
||||
/// <summary> |
||||
/// Start client with specified workload. |
||||
/// First request sent specifies the ClientConfig followed by ClientStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test client |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return RunClient(new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Start client with specified workload. |
||||
/// First request sent specifies the ClientConfig followed by ClientStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test client |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncDuplexStreamingCall(__Method_RunClient, null, options); |
||||
} |
||||
/// <summary> |
||||
/// Just return the core count - unary call |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return CoreCount(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Just return the core count - unary call |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.BlockingUnaryCall(__Method_CoreCount, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Just return the core count - unary call |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return CoreCountAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Just return the core count - unary call |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncUnaryCall(__Method_CoreCount, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Quit this worker |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return QuitWorker(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Quit this worker |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.BlockingUnaryCall(__Method_QuitWorker, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Quit this worker |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return QuitWorkerAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Quit this worker |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncUnaryCall(__Method_QuitWorker, null, options, request); |
||||
} |
||||
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
||||
protected override WorkerServiceClient NewInstance(ClientBaseConfiguration configuration) |
||||
{ |
||||
return new WorkerServiceClient(configuration); |
||||
} |
||||
} |
||||
|
||||
/// <summary>Creates service definition that can be registered with a server</summary> |
||||
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
||||
public static grpc::ServerServiceDefinition BindService(WorkerServiceBase serviceImpl) |
||||
{ |
||||
return grpc::ServerServiceDefinition.CreateBuilder() |
||||
.AddMethod(__Method_RunServer, serviceImpl.RunServer) |
||||
.AddMethod(__Method_RunClient, serviceImpl.RunClient) |
||||
.AddMethod(__Method_CoreCount, serviceImpl.CoreCount) |
||||
.AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build(); |
||||
} |
||||
|
||||
} |
||||
public static partial class ReportQpsScenarioService |
||||
{ |
||||
static readonly string __ServiceName = "grpc.testing.ReportQpsScenarioService"; |
||||
|
||||
static readonly grpc::Marshaller<global::Grpc.Testing.ScenarioResult> __Marshaller_ScenarioResult = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ScenarioResult.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.Void> __Marshaller_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void> __Method_ReportScenario = new grpc::Method<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void>( |
||||
grpc::MethodType.Unary, |
||||
__ServiceName, |
||||
"ReportScenario", |
||||
__Marshaller_ScenarioResult, |
||||
__Marshaller_Void); |
||||
|
||||
/// <summary>Service descriptor</summary> |
||||
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
||||
{ |
||||
get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[2]; } |
||||
} |
||||
|
||||
/// <summary>Base class for server-side implementations of ReportQpsScenarioService</summary> |
||||
public abstract partial class ReportQpsScenarioServiceBase |
||||
{ |
||||
/// <summary> |
||||
/// Report results of a QPS test benchmark scenario. |
||||
/// </summary> |
||||
/// <param name="request">The request received from the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
||||
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
} |
||||
|
||||
/// <summary>Client for ReportQpsScenarioService</summary> |
||||
public partial class ReportQpsScenarioServiceClient : grpc::ClientBase<ReportQpsScenarioServiceClient> |
||||
{ |
||||
/// <summary>Creates a new client for ReportQpsScenarioService</summary> |
||||
/// <param name="channel">The channel to use to make remote calls.</param> |
||||
public ReportQpsScenarioServiceClient(grpc::Channel channel) : base(channel) |
||||
{ |
||||
} |
||||
/// <summary>Creates a new client for ReportQpsScenarioService that uses a custom <c>CallInvoker</c>.</summary> |
||||
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param> |
||||
public ReportQpsScenarioServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
||||
{ |
||||
} |
||||
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
||||
protected ReportQpsScenarioServiceClient() : base() |
||||
{ |
||||
} |
||||
/// <summary>Protected constructor to allow creation of configured clients.</summary> |
||||
/// <param name="configuration">The client configuration.</param> |
||||
protected ReportQpsScenarioServiceClient(ClientBaseConfiguration configuration) : base(configuration) |
||||
{ |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Report results of a QPS test benchmark scenario. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return ReportScenario(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Report results of a QPS test benchmark scenario. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.BlockingUnaryCall(__Method_ReportScenario, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Report results of a QPS test benchmark scenario. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return ReportScenarioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Report results of a QPS test benchmark scenario. |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncUnaryCall(__Method_ReportScenario, null, options, request); |
||||
} |
||||
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
||||
protected override ReportQpsScenarioServiceClient NewInstance(ClientBaseConfiguration configuration) |
||||
{ |
||||
return new ReportQpsScenarioServiceClient(configuration); |
||||
} |
||||
} |
||||
|
||||
/// <summary>Creates service definition that can be registered with a server</summary> |
||||
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
||||
public static grpc::ServerServiceDefinition BindService(ReportQpsScenarioServiceBase serviceImpl) |
||||
{ |
||||
return grpc::ServerServiceDefinition.CreateBuilder() |
||||
.AddMethod(__Method_ReportScenario, serviceImpl.ReportScenario).Build(); |
||||
} |
||||
|
||||
} |
||||
} |
||||
#endregion |
@ -0,0 +1,43 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: src/proto/grpc/testing/worker_service.proto |
||||
#pragma warning disable 1591, 0612, 3021 |
||||
#region Designer generated code |
||||
|
||||
using pb = global::Google.Protobuf; |
||||
using pbc = global::Google.Protobuf.Collections; |
||||
using pbr = global::Google.Protobuf.Reflection; |
||||
using scg = global::System.Collections.Generic; |
||||
namespace Grpc.Testing { |
||||
|
||||
/// <summary>Holder for reflection information generated from src/proto/grpc/testing/worker_service.proto</summary> |
||||
public static partial class WorkerServiceReflection { |
||||
|
||||
#region Descriptor |
||||
/// <summary>File descriptor for src/proto/grpc/testing/worker_service.proto</summary> |
||||
public static pbr::FileDescriptor Descriptor { |
||||
get { return descriptor; } |
||||
} |
||||
private static pbr::FileDescriptor descriptor; |
||||
|
||||
static WorkerServiceReflection() { |
||||
byte[] descriptorData = global::System.Convert.FromBase64String( |
||||
string.Concat( |
||||
"CitzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL3dvcmtlcl9zZXJ2aWNlLnByb3Rv", |
||||
"EgxncnBjLnRlc3RpbmcaJHNyYy9wcm90by9ncnBjL3Rlc3RpbmcvY29udHJv", |
||||
"bC5wcm90bzKXAgoNV29ya2VyU2VydmljZRJFCglSdW5TZXJ2ZXISGC5ncnBj", |
||||
"LnRlc3RpbmcuU2VydmVyQXJncxoaLmdycGMudGVzdGluZy5TZXJ2ZXJTdGF0", |
||||
"dXMoATABEkUKCVJ1bkNsaWVudBIYLmdycGMudGVzdGluZy5DbGllbnRBcmdz", |
||||
"GhouZ3JwYy50ZXN0aW5nLkNsaWVudFN0YXR1cygBMAESQgoJQ29yZUNvdW50", |
||||
"EhkuZ3JwYy50ZXN0aW5nLkNvcmVSZXF1ZXN0GhouZ3JwYy50ZXN0aW5nLkNv", |
||||
"cmVSZXNwb25zZRI0CgpRdWl0V29ya2VyEhIuZ3JwYy50ZXN0aW5nLlZvaWQa", |
||||
"Ei5ncnBjLnRlc3RpbmcuVm9pZGIGcHJvdG8z")); |
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
||||
new pbr::FileDescriptor[] { global::Grpc.Testing.ControlReflection.Descriptor, }, |
||||
new pbr::GeneratedClrTypeInfo(null, null)); |
||||
} |
||||
#endregion |
||||
|
||||
} |
||||
} |
||||
|
||||
#endregion Designer generated code |
@ -0,0 +1,326 @@ |
||||
// <auto-generated> |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: src/proto/grpc/testing/worker_service.proto |
||||
// </auto-generated> |
||||
// Original file comments: |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
#pragma warning disable 1591 |
||||
#region Designer generated code |
||||
|
||||
using grpc = global::Grpc.Core; |
||||
|
||||
namespace Grpc.Testing { |
||||
public static partial class WorkerService |
||||
{ |
||||
static readonly string __ServiceName = "grpc.testing.WorkerService"; |
||||
|
||||
static readonly grpc::Marshaller<global::Grpc.Testing.ServerArgs> __Marshaller_ServerArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerArgs.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.ServerStatus> __Marshaller_ServerStatus = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ServerStatus.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.ClientArgs> __Marshaller_ClientArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientArgs.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.ClientStatus> __Marshaller_ClientStatus = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ClientStatus.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.CoreRequest> __Marshaller_CoreRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreRequest.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.CoreResponse> __Marshaller_CoreResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.CoreResponse.Parser.ParseFrom); |
||||
static readonly grpc::Marshaller<global::Grpc.Testing.Void> __Marshaller_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> __Method_RunServer = new grpc::Method<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus>( |
||||
grpc::MethodType.DuplexStreaming, |
||||
__ServiceName, |
||||
"RunServer", |
||||
__Marshaller_ServerArgs, |
||||
__Marshaller_ServerStatus); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> __Method_RunClient = new grpc::Method<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus>( |
||||
grpc::MethodType.DuplexStreaming, |
||||
__ServiceName, |
||||
"RunClient", |
||||
__Marshaller_ClientArgs, |
||||
__Marshaller_ClientStatus); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse> __Method_CoreCount = new grpc::Method<global::Grpc.Testing.CoreRequest, global::Grpc.Testing.CoreResponse>( |
||||
grpc::MethodType.Unary, |
||||
__ServiceName, |
||||
"CoreCount", |
||||
__Marshaller_CoreRequest, |
||||
__Marshaller_CoreResponse); |
||||
|
||||
static readonly grpc::Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void> __Method_QuitWorker = new grpc::Method<global::Grpc.Testing.Void, global::Grpc.Testing.Void>( |
||||
grpc::MethodType.Unary, |
||||
__ServiceName, |
||||
"QuitWorker", |
||||
__Marshaller_Void, |
||||
__Marshaller_Void); |
||||
|
||||
/// <summary>Service descriptor</summary> |
||||
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
||||
{ |
||||
get { return global::Grpc.Testing.WorkerServiceReflection.Descriptor.Services[0]; } |
||||
} |
||||
|
||||
/// <summary>Base class for server-side implementations of WorkerService</summary> |
||||
public abstract partial class WorkerServiceBase |
||||
{ |
||||
/// <summary> |
||||
/// Start server with specified workload. |
||||
/// First request sent specifies the ServerConfig followed by ServerStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test server |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="requestStream">Used for reading requests from the client.</param> |
||||
/// <param name="responseStream">Used for sending responses back to the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>A task indicating completion of the handler.</returns> |
||||
public virtual global::System.Threading.Tasks.Task RunServer(grpc::IAsyncStreamReader<global::Grpc.Testing.ServerArgs> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.ServerStatus> responseStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Start client with specified workload. |
||||
/// First request sent specifies the ClientConfig followed by ClientStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test client |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="requestStream">Used for reading requests from the client.</param> |
||||
/// <param name="responseStream">Used for sending responses back to the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>A task indicating completion of the handler.</returns> |
||||
public virtual global::System.Threading.Tasks.Task RunClient(grpc::IAsyncStreamReader<global::Grpc.Testing.ClientArgs> requestStream, grpc::IServerStreamWriter<global::Grpc.Testing.ClientStatus> responseStream, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Just return the core count - unary call |
||||
/// </summary> |
||||
/// <param name="request">The request received from the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
||||
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.CoreResponse> CoreCount(global::Grpc.Testing.CoreRequest request, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Quit this worker |
||||
/// </summary> |
||||
/// <param name="request">The request received from the client.</param> |
||||
/// <param name="context">The context of the server-side call handler being invoked.</param> |
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns> |
||||
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> QuitWorker(global::Grpc.Testing.Void request, grpc::ServerCallContext context) |
||||
{ |
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
||||
} |
||||
|
||||
} |
||||
|
||||
/// <summary>Client for WorkerService</summary> |
||||
public partial class WorkerServiceClient : grpc::ClientBase<WorkerServiceClient> |
||||
{ |
||||
/// <summary>Creates a new client for WorkerService</summary> |
||||
/// <param name="channel">The channel to use to make remote calls.</param> |
||||
public WorkerServiceClient(grpc::Channel channel) : base(channel) |
||||
{ |
||||
} |
||||
/// <summary>Creates a new client for WorkerService that uses a custom <c>CallInvoker</c>.</summary> |
||||
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param> |
||||
public WorkerServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
||||
{ |
||||
} |
||||
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
||||
protected WorkerServiceClient() : base() |
||||
{ |
||||
} |
||||
/// <summary>Protected constructor to allow creation of configured clients.</summary> |
||||
/// <param name="configuration">The client configuration.</param> |
||||
protected WorkerServiceClient(ClientBaseConfiguration configuration) : base(configuration) |
||||
{ |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Start server with specified workload. |
||||
/// First request sent specifies the ServerConfig followed by ServerStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test server |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return RunServer(new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Start server with specified workload. |
||||
/// First request sent specifies the ServerConfig followed by ServerStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test server |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ServerArgs, global::Grpc.Testing.ServerStatus> RunServer(grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncDuplexStreamingCall(__Method_RunServer, null, options); |
||||
} |
||||
/// <summary> |
||||
/// Start client with specified workload. |
||||
/// First request sent specifies the ClientConfig followed by ClientStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test client |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return RunClient(new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Start client with specified workload. |
||||
/// First request sent specifies the ClientConfig followed by ClientStatus |
||||
/// response. After that, a "Mark" can be sent anytime to request the latest |
||||
/// stats. Closing the stream will initiate shutdown of the test client |
||||
/// and once the shutdown has finished, the OK status is sent to terminate |
||||
/// this RPC. |
||||
/// </summary> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Testing.ClientArgs, global::Grpc.Testing.ClientStatus> RunClient(grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncDuplexStreamingCall(__Method_RunClient, null, options); |
||||
} |
||||
/// <summary> |
||||
/// Just return the core count - unary call |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return CoreCount(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Just return the core count - unary call |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.BlockingUnaryCall(__Method_CoreCount, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Just return the core count - unary call |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return CoreCountAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Just return the core count - unary call |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.CoreResponse> CoreCountAsync(global::Grpc.Testing.CoreRequest request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncUnaryCall(__Method_CoreCount, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Quit this worker |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return QuitWorker(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Quit this worker |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The response received from the server.</returns> |
||||
public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.BlockingUnaryCall(__Method_QuitWorker, null, options, request); |
||||
} |
||||
/// <summary> |
||||
/// Quit this worker |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param> |
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param> |
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) |
||||
{ |
||||
return QuitWorkerAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
||||
} |
||||
/// <summary> |
||||
/// Quit this worker |
||||
/// </summary> |
||||
/// <param name="request">The request to send to the server.</param> |
||||
/// <param name="options">The options for the call.</param> |
||||
/// <returns>The call object.</returns> |
||||
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> QuitWorkerAsync(global::Grpc.Testing.Void request, grpc::CallOptions options) |
||||
{ |
||||
return CallInvoker.AsyncUnaryCall(__Method_QuitWorker, null, options, request); |
||||
} |
||||
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
||||
protected override WorkerServiceClient NewInstance(ClientBaseConfiguration configuration) |
||||
{ |
||||
return new WorkerServiceClient(configuration); |
||||
} |
||||
} |
||||
|
||||
/// <summary>Creates service definition that can be registered with a server</summary> |
||||
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
||||
public static grpc::ServerServiceDefinition BindService(WorkerServiceBase serviceImpl) |
||||
{ |
||||
return grpc::ServerServiceDefinition.CreateBuilder() |
||||
.AddMethod(__Method_RunServer, serviceImpl.RunServer) |
||||
.AddMethod(__Method_RunClient, serviceImpl.RunClient) |
||||
.AddMethod(__Method_CoreCount, serviceImpl.CoreCount) |
||||
.AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build(); |
||||
} |
||||
|
||||
} |
||||
} |
||||
#endregion |
@ -0,0 +1,41 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/benchmark_service.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class BenchmarkService |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0aef030a2e7372632f70726f746f2f677270632f74657374696e672f6265" . |
||||
"6e63686d61726b5f736572766963652e70726f746f120c677270632e7465" . |
||||
"7374696e6732a6030a1042656e63686d61726b5365727669636512460a09" . |
||||
"556e61727943616c6c121b2e677270632e74657374696e672e53696d706c" . |
||||
"65526571756573741a1c2e677270632e74657374696e672e53696d706c65" . |
||||
"526573706f6e7365124e0a0d53747265616d696e6743616c6c121b2e6772" . |
||||
"70632e74657374696e672e53696d706c65526571756573741a1c2e677270" . |
||||
"632e74657374696e672e53696d706c65526573706f6e7365280130011252" . |
||||
"0a1353747265616d696e6746726f6d436c69656e74121b2e677270632e74" . |
||||
"657374696e672e53696d706c65526571756573741a1c2e677270632e7465" . |
||||
"7374696e672e53696d706c65526573706f6e7365280112520a1353747265" . |
||||
"616d696e6746726f6d536572766572121b2e677270632e74657374696e67" . |
||||
"2e53696d706c65526571756573741a1c2e677270632e74657374696e672e" . |
||||
"53696d706c65526573706f6e7365300112520a1153747265616d696e6742" . |
||||
"6f746857617973121b2e677270632e74657374696e672e53696d706c6552" . |
||||
"6571756573741a1c2e677270632e74657374696e672e53696d706c655265" . |
||||
"73706f6e736528013001620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,37 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/compiler_test.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class CompilerTest |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0aa1030a2a7372632f70726f746f2f677270632f74657374696e672f636f" . |
||||
"6d70696c65725f746573742e70726f746f120c677270632e74657374696e" . |
||||
"6722090a0752657175657374220a0a08526573706f6e736532fe010a0853" . |
||||
"6572766963654112390a084d6574686f64413112152e677270632e746573" . |
||||
"74696e672e526571756573741a162e677270632e74657374696e672e5265" . |
||||
"73706f6e7365123b0a084d6574686f64413212152e677270632e74657374" . |
||||
"696e672e526571756573741a162e677270632e74657374696e672e526573" . |
||||
"706f6e73652801123b0a084d6574686f64413312152e677270632e746573" . |
||||
"74696e672e526571756573741a162e677270632e74657374696e672e5265" . |
||||
"73706f6e73653001123d0a084d6574686f64413412152e677270632e7465" . |
||||
"7374696e672e526571756573741a162e677270632e74657374696e672e52" . |
||||
"6573706f6e73652801300132450a08536572766963654212390a084d6574" . |
||||
"686f64423112152e677270632e74657374696e672e526571756573741a16" . |
||||
"2e677270632e74657374696e672e526573706f6e7365620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,43 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/echo.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class Echo |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0aa6040a217372632f70726f746f2f677270632f74657374696e672f6563" . |
||||
"686f2e70726f746f120c677270632e74657374696e6732f6020a0f456368" . |
||||
"6f5465737453657276696365123d0a044563686f12192e677270632e7465" . |
||||
"7374696e672e4563686f526571756573741a1a2e677270632e7465737469" . |
||||
"6e672e4563686f526573706f6e736512480a0d5265717565737453747265" . |
||||
"616d12192e677270632e74657374696e672e4563686f526571756573741a" . |
||||
"1a2e677270632e74657374696e672e4563686f526573706f6e7365280112" . |
||||
"490a0e526573706f6e736553747265616d12192e677270632e7465737469" . |
||||
"6e672e4563686f526571756573741a1a2e677270632e74657374696e672e" . |
||||
"4563686f526573706f6e7365300112470a0a4269646953747265616d1219" . |
||||
"2e677270632e74657374696e672e4563686f526571756573741a1a2e6772" . |
||||
"70632e74657374696e672e4563686f526573706f6e73652801300112460a" . |
||||
"0d556e696d706c656d656e74656412192e677270632e74657374696e672e" . |
||||
"4563686f526571756573741a1a2e677270632e74657374696e672e456368" . |
||||
"6f526573706f6e736532620a18556e696d706c656d656e7465644563686f" . |
||||
"5365727669636512460a0d556e696d706c656d656e74656412192e677270" . |
||||
"632e74657374696e672e4563686f526571756573741a1a2e677270632e74" . |
||||
"657374696e672e4563686f526573706f6e7365320e0a0c4e6f5270635365" . |
||||
"7276696365620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,54 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/echo_messages.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class EchoMessages |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0a8f070a2a7372632f70726f746f2f677270632f74657374696e672f6563" . |
||||
"686f5f6d657373616765732e70726f746f120c677270632e74657374696e" . |
||||
"6722320a094465627567496e666f12150a0d737461636b5f656e74726965" . |
||||
"73180120032809120e0a0664657461696c18022001280922500a0b457272" . |
||||
"6f72537461747573120c0a04636f646518012001280512150a0d6572726f" . |
||||
"725f6d657373616765180220012809121c0a1462696e6172795f6572726f" . |
||||
"725f64657461696c7318032001280922e2030a0d52657175657374506172" . |
||||
"616d7312150a0d6563686f5f646561646c696e65180120012808121e0a16" . |
||||
"636c69656e745f63616e63656c5f61667465725f7573180220012805121e" . |
||||
"0a167365727665725f63616e63656c5f61667465725f7573180320012805" . |
||||
"12150a0d6563686f5f6d65746164617461180420012808121a0a12636865" . |
||||
"636b5f617574685f636f6e74657874180520012808121f0a17726573706f" . |
||||
"6e73655f6d6573736167655f6c656e67746818062001280512110a096563" . |
||||
"686f5f7065657218072001280812200a1865787065637465645f636c6965" . |
||||
"6e745f6964656e74697479180820012809121c0a14736b69705f63616e63" . |
||||
"656c6c65645f636865636b18092001280812280a2065787065637465645f" . |
||||
"7472616e73706f72745f73656375726974795f74797065180a2001280912" . |
||||
"2b0a0a64656275675f696e666f180b2001280b32172e677270632e746573" . |
||||
"74696e672e4465627567496e666f12120a0a7365727665725f646965180c" . |
||||
"20012808121c0a1462696e6172795f6572726f725f64657461696c73180d" . |
||||
"2001280912310a0e65787065637465645f6572726f72180e2001280b3219" . |
||||
"2e677270632e74657374696e672e4572726f7253746174757312170a0f73" . |
||||
"65727665725f736c6565705f7573180f20012805224a0a0b4563686f5265" . |
||||
"7175657374120f0a076d657373616765180120012809122a0a0570617261" . |
||||
"6d18022001280b321b2e677270632e74657374696e672e52657175657374" . |
||||
"506172616d7322460a0e526573706f6e7365506172616d7312180a107265" . |
||||
"71756573745f646561646c696e65180120012803120c0a04686f73741802" . |
||||
"20012809120c0a0470656572180320012809224c0a0c4563686f52657370" . |
||||
"6f6e7365120f0a076d657373616765180120012809122b0a05706172616d" . |
||||
"18022001280b321c2e677270632e74657374696e672e526573706f6e7365" . |
||||
"506172616d73620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,26 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/empty.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class GPBEmpty |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0a430a227372632f70726f746f2f677270632f74657374696e672f656d70" . |
||||
"74792e70726f746f120c677270632e74657374696e6722070a05456d7074" . |
||||
"79620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,36 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/metrics.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class Metrics |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0afb020a247372632f70726f746f2f677270632f74657374696e672f6d65" . |
||||
"74726963732e70726f746f120c677270632e74657374696e67226c0a0d47" . |
||||
"61756765526573706f6e7365120c0a046e616d6518012001280912140a0a" . |
||||
"6c6f6e675f76616c7565180220012803480012160a0c646f75626c655f76" . |
||||
"616c7565180320012801480012160a0c737472696e675f76616c75651804" . |
||||
"20012809480042070a0576616c7565221c0a0c4761756765526571756573" . |
||||
"74120c0a046e616d65180120012809220e0a0c456d7074794d6573736167" . |
||||
"6532a0010a0e4d6574726963735365727669636512490a0c476574416c6c" . |
||||
"476175676573121a2e677270632e74657374696e672e456d7074794d6573" . |
||||
"736167651a1b2e677270632e74657374696e672e4761756765526573706f" . |
||||
"6e7365300112430a084765744761756765121a2e677270632e7465737469" . |
||||
"6e672e4761756765526571756573741a1b2e677270632e74657374696e67" . |
||||
"2e4761756765526573706f6e7365620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,30 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/report_qps_scenario_service.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class ReportQpsScenarioService |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0ab0010a387372632f70726f746f2f677270632f74657374696e672f7265" . |
||||
"706f72745f7170735f7363656e6172696f5f736572766963652e70726f74" . |
||||
"6f120c677270632e74657374696e67325e0a185265706f72745170735363" . |
||||
"656e6172696f5365727669636512420a0e5265706f72745363656e617269" . |
||||
"6f121c2e677270632e74657374696e672e5363656e6172696f526573756c" . |
||||
"741a122e677270632e74657374696e672e566f6964620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,60 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/test.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class Test |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\GPBEmpty::initOnce(); |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0a91080a217372632f70726f746f2f677270632f74657374696e672f7465" . |
||||
"73742e70726f746f120c677270632e74657374696e671a257372632f7072" . |
||||
"6f746f2f677270632f74657374696e672f6d657373616765732e70726f74" . |
||||
"6f32cb050a0b546573745365727669636512350a09456d70747943616c6c" . |
||||
"12132e677270632e74657374696e672e456d7074791a132e677270632e74" . |
||||
"657374696e672e456d70747912460a09556e61727943616c6c121b2e6772" . |
||||
"70632e74657374696e672e53696d706c65526571756573741a1c2e677270" . |
||||
"632e74657374696e672e53696d706c65526573706f6e7365124f0a124361" . |
||||
"63686561626c65556e61727943616c6c121b2e677270632e74657374696e" . |
||||
"672e53696d706c65526571756573741a1c2e677270632e74657374696e67" . |
||||
"2e53696d706c65526573706f6e7365126c0a1353747265616d696e674f75" . |
||||
"7470757443616c6c12282e677270632e74657374696e672e53747265616d" . |
||||
"696e674f757470757443616c6c526571756573741a292e677270632e7465" . |
||||
"7374696e672e53747265616d696e674f757470757443616c6c526573706f" . |
||||
"6e7365300112690a1253747265616d696e67496e70757443616c6c12272e" . |
||||
"677270632e74657374696e672e53747265616d696e67496e70757443616c" . |
||||
"6c526571756573741a282e677270632e74657374696e672e53747265616d" . |
||||
"696e67496e70757443616c6c526573706f6e7365280112690a0e46756c6c" . |
||||
"4475706c657843616c6c12282e677270632e74657374696e672e53747265" . |
||||
"616d696e674f757470757443616c6c526571756573741a292e677270632e" . |
||||
"74657374696e672e53747265616d696e674f757470757443616c6c526573" . |
||||
"706f6e73652801300112690a0e48616c664475706c657843616c6c12282e" . |
||||
"677270632e74657374696e672e53747265616d696e674f75747075744361" . |
||||
"6c6c526571756573741a292e677270632e74657374696e672e5374726561" . |
||||
"6d696e674f757470757443616c6c526573706f6e736528013001123d0a11" . |
||||
"556e696d706c656d656e74656443616c6c12132e677270632e7465737469" . |
||||
"6e672e456d7074791a132e677270632e74657374696e672e456d70747932" . |
||||
"550a14556e696d706c656d656e74656453657276696365123d0a11556e69" . |
||||
"6d706c656d656e74656443616c6c12132e677270632e74657374696e672e" . |
||||
"456d7074791a132e677270632e74657374696e672e456d7074793289010a" . |
||||
"105265636f6e6e65637453657276696365123b0a055374617274121d2e67" . |
||||
"7270632e74657374696e672e5265636f6e6e656374506172616d731a132e" . |
||||
"677270632e74657374696e672e456d70747912380a0453746f7012132e67" . |
||||
"7270632e74657374696e672e456d7074791a1b2e677270632e7465737469" . |
||||
"6e672e5265636f6e6e656374496e666f620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,36 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/worker_service.proto |
||||
|
||||
namespace GPBMetadata\Src\Proto\Grpc\Testing; |
||||
|
||||
class WorkerService |
||||
{ |
||||
public static $is_initialized = false; |
||||
|
||||
public static function initOnce() { |
||||
$pool = \Google\Protobuf\Internal\DescriptorPool::getGeneratedPool(); |
||||
|
||||
if (static::$is_initialized == true) { |
||||
return; |
||||
} |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); |
||||
$pool->internalAddGeneratedFile(hex2bin( |
||||
"0add020a2b7372632f70726f746f2f677270632f74657374696e672f776f" . |
||||
"726b65725f736572766963652e70726f746f120c677270632e7465737469" . |
||||
"6e673297020a0d576f726b65725365727669636512450a0952756e536572" . |
||||
"76657212182e677270632e74657374696e672e536572766572417267731a" . |
||||
"1a2e677270632e74657374696e672e536572766572537461747573280130" . |
||||
"0112450a0952756e436c69656e7412182e677270632e74657374696e672e" . |
||||
"436c69656e74417267731a1a2e677270632e74657374696e672e436c6965" . |
||||
"6e745374617475732801300112420a09436f7265436f756e7412192e6772" . |
||||
"70632e74657374696e672e436f7265526571756573741a1a2e677270632e" . |
||||
"74657374696e672e436f7265526573706f6e736512340a0a51756974576f" . |
||||
"726b657212122e677270632e74657374696e672e566f69641a122e677270" . |
||||
"632e74657374696e672e566f6964620670726f746f33" |
||||
)); |
||||
|
||||
static::$is_initialized = true; |
||||
} |
||||
} |
||||
|
@ -0,0 +1,77 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/echo_messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Message to be echoed back serialized in trailer. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.DebugInfo</code> |
||||
*/ |
||||
class DebugInfo extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>repeated string stack_entries = 1;</code> |
||||
*/ |
||||
private $stack_entries; |
||||
/** |
||||
* Generated from protobuf field <code>string detail = 2;</code> |
||||
*/ |
||||
private $detail = ''; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>repeated string stack_entries = 1;</code> |
||||
* @return \Google\Protobuf\Internal\RepeatedField |
||||
*/ |
||||
public function getStackEntries() |
||||
{ |
||||
return $this->stack_entries; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>repeated string stack_entries = 1;</code> |
||||
* @param string[]|\Google\Protobuf\Internal\RepeatedField $var |
||||
* @return $this |
||||
*/ |
||||
public function setStackEntries($var) |
||||
{ |
||||
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); |
||||
$this->stack_entries = $arr; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string detail = 2;</code> |
||||
* @return string |
||||
*/ |
||||
public function getDetail() |
||||
{ |
||||
return $this->detail; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string detail = 2;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setDetail($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->detail = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,75 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/echo_messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.EchoRequest</code> |
||||
*/ |
||||
class EchoRequest extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>string message = 1;</code> |
||||
*/ |
||||
private $message = ''; |
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.RequestParams param = 2;</code> |
||||
*/ |
||||
private $param = null; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string message = 1;</code> |
||||
* @return string |
||||
*/ |
||||
public function getMessage() |
||||
{ |
||||
return $this->message; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string message = 1;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setMessage($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->message = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.RequestParams param = 2;</code> |
||||
* @return \Grpc\Testing\RequestParams |
||||
*/ |
||||
public function getParam() |
||||
{ |
||||
return $this->param; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.RequestParams param = 2;</code> |
||||
* @param \Grpc\Testing\RequestParams $var |
||||
* @return $this |
||||
*/ |
||||
public function setParam($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\RequestParams::class); |
||||
$this->param = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,75 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/echo_messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.EchoResponse</code> |
||||
*/ |
||||
class EchoResponse extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>string message = 1;</code> |
||||
*/ |
||||
private $message = ''; |
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.ResponseParams param = 2;</code> |
||||
*/ |
||||
private $param = null; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string message = 1;</code> |
||||
* @return string |
||||
*/ |
||||
public function getMessage() |
||||
{ |
||||
return $this->message; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string message = 1;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setMessage($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->message = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.ResponseParams param = 2;</code> |
||||
* @return \Grpc\Testing\ResponseParams |
||||
*/ |
||||
public function getParam() |
||||
{ |
||||
return $this->param; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.ResponseParams param = 2;</code> |
||||
* @param \Grpc\Testing\ResponseParams $var |
||||
* @return $this |
||||
*/ |
||||
public function setParam($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\ResponseParams::class); |
||||
$this->param = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,93 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
*/ |
||||
class EchoTestServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* @param \Grpc\Testing\EchoRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function Echo(\Grpc\Testing\EchoRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.EchoTestService/Echo', |
||||
$argument, |
||||
['\Grpc\Testing\EchoResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function RequestStream($metadata = [], $options = []) { |
||||
return $this->_clientStreamRequest('/grpc.testing.EchoTestService/RequestStream', |
||||
['\Grpc\Testing\EchoResponse','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* @param \Grpc\Testing\EchoRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function ResponseStream(\Grpc\Testing\EchoRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_serverStreamRequest('/grpc.testing.EchoTestService/ResponseStream', |
||||
$argument, |
||||
['\Grpc\Testing\EchoResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function BidiStream($metadata = [], $options = []) { |
||||
return $this->_bidiRequest('/grpc.testing.EchoTestService/BidiStream', |
||||
['\Grpc\Testing\EchoResponse','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* @param \Grpc\Testing\EchoRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function Unimplemented(\Grpc\Testing\EchoRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.EchoTestService/Unimplemented', |
||||
$argument, |
||||
['\Grpc\Testing\EchoResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,23 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/metrics.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.EmptyMessage</code> |
||||
*/ |
||||
class EmptyMessage extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,103 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/echo_messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Error status client expects to see. |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.ErrorStatus</code> |
||||
*/ |
||||
class ErrorStatus extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>int32 code = 1;</code> |
||||
*/ |
||||
private $code = 0; |
||||
/** |
||||
* Generated from protobuf field <code>string error_message = 2;</code> |
||||
*/ |
||||
private $error_message = ''; |
||||
/** |
||||
* Generated from protobuf field <code>string binary_error_details = 3;</code> |
||||
*/ |
||||
private $binary_error_details = ''; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 code = 1;</code> |
||||
* @return int |
||||
*/ |
||||
public function getCode() |
||||
{ |
||||
return $this->code; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 code = 1;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setCode($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->code = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string error_message = 2;</code> |
||||
* @return string |
||||
*/ |
||||
public function getErrorMessage() |
||||
{ |
||||
return $this->error_message; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string error_message = 2;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setErrorMessage($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->error_message = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string binary_error_details = 3;</code> |
||||
* @return string |
||||
*/ |
||||
public function getBinaryErrorDetails() |
||||
{ |
||||
return $this->binary_error_details; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string binary_error_details = 3;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setBinaryErrorDetails($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->binary_error_details = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,51 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/metrics.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Request message containing the gauge name |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.GaugeRequest</code> |
||||
*/ |
||||
class GaugeRequest extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
*/ |
||||
private $name = ''; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @return string |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return $this->name; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setName($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->name = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,126 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/metrics.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Reponse message containing the gauge name and value |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.GaugeResponse</code> |
||||
*/ |
||||
class GaugeResponse extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
*/ |
||||
private $name = ''; |
||||
protected $value; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @return string |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return $this->name; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string name = 1;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setName($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->name = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 long_value = 2;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getLongValue() |
||||
{ |
||||
return $this->readOneof(2); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 long_value = 2;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setLongValue($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->writeOneof(2, $var); |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>double double_value = 3;</code> |
||||
* @return float |
||||
*/ |
||||
public function getDoubleValue() |
||||
{ |
||||
return $this->readOneof(3); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>double double_value = 3;</code> |
||||
* @param float $var |
||||
* @return $this |
||||
*/ |
||||
public function setDoubleValue($var) |
||||
{ |
||||
GPBUtil::checkDouble($var); |
||||
$this->writeOneof(3, $var); |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string string_value = 4;</code> |
||||
* @return string |
||||
*/ |
||||
public function getStringValue() |
||||
{ |
||||
return $this->readOneof(4); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string string_value = 4;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setStringValue($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->writeOneof(4, $var); |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* @return string |
||||
*/ |
||||
public function getValue() |
||||
{ |
||||
return $this->whichOneof("value"); |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,69 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015-2016 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// Contains the definitions for a metrics service and the type of metrics |
||||
// exposed by the service. |
||||
// |
||||
// Currently, 'Gauge' (i.e a metric that represents the measured value of |
||||
// something at an instant of time) is the only metric type supported by the |
||||
// service. |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
*/ |
||||
class MetricsServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* Returns the values of all the gauges that are currently being maintained by |
||||
* the service |
||||
* @param \Grpc\Testing\EmptyMessage $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function GetAllGauges(\Grpc\Testing\EmptyMessage $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_serverStreamRequest('/grpc.testing.MetricsService/GetAllGauges', |
||||
$argument, |
||||
['\Grpc\Testing\GaugeResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* Returns the value of one gauge |
||||
* @param \Grpc\Testing\GaugeRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function GetGauge(\Grpc\Testing\GaugeRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.MetricsService/GetGauge', |
||||
$argument, |
||||
['\Grpc\Testing\GaugeResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,35 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
* A service without any rpc defined to test coverage. |
||||
*/ |
||||
class NoRpcServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,30 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/empty.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* An empty message that you can re-use to avoid defining duplicated empty |
||||
* messages in your project. A typical example is to use it as argument or the |
||||
* return value of a service API. For instance: |
||||
* service Foo { |
||||
* rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; |
||||
* }; |
||||
* |
||||
* Generated from protobuf message <code>grpc.testing.Empty</code> |
||||
*/ |
||||
class PBEmpty extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\GPBEmpty::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,23 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/control.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.Void</code> |
||||
*/ |
||||
class PBVoid extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,64 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015-2016 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
* A service used to control reconnect server. |
||||
*/ |
||||
class ReconnectServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* @param \Grpc\Testing\ReconnectParams $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function Start(\Grpc\Testing\ReconnectParams $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.ReconnectService/Start', |
||||
$argument, |
||||
['\Grpc\Testing\PBEmpty', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* @param \Grpc\Testing\PBEmpty $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function Stop(\Grpc\Testing\PBEmpty $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.ReconnectService/Stop', |
||||
$argument, |
||||
['\Grpc\Testing\ReconnectInfo', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,23 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/compiler_test.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.Request</code> |
||||
*/ |
||||
class Request extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\CompilerTest::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,431 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/echo_messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.RequestParams</code> |
||||
*/ |
||||
class RequestParams extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>bool echo_deadline = 1;</code> |
||||
*/ |
||||
private $echo_deadline = false; |
||||
/** |
||||
* Generated from protobuf field <code>int32 client_cancel_after_us = 2;</code> |
||||
*/ |
||||
private $client_cancel_after_us = 0; |
||||
/** |
||||
* Generated from protobuf field <code>int32 server_cancel_after_us = 3;</code> |
||||
*/ |
||||
private $server_cancel_after_us = 0; |
||||
/** |
||||
* Generated from protobuf field <code>bool echo_metadata = 4;</code> |
||||
*/ |
||||
private $echo_metadata = false; |
||||
/** |
||||
* Generated from protobuf field <code>bool check_auth_context = 5;</code> |
||||
*/ |
||||
private $check_auth_context = false; |
||||
/** |
||||
* Generated from protobuf field <code>int32 response_message_length = 6;</code> |
||||
*/ |
||||
private $response_message_length = 0; |
||||
/** |
||||
* Generated from protobuf field <code>bool echo_peer = 7;</code> |
||||
*/ |
||||
private $echo_peer = false; |
||||
/** |
||||
* will force check_auth_context. |
||||
* |
||||
* Generated from protobuf field <code>string expected_client_identity = 8;</code> |
||||
*/ |
||||
private $expected_client_identity = ''; |
||||
/** |
||||
* Generated from protobuf field <code>bool skip_cancelled_check = 9;</code> |
||||
*/ |
||||
private $skip_cancelled_check = false; |
||||
/** |
||||
* Generated from protobuf field <code>string expected_transport_security_type = 10;</code> |
||||
*/ |
||||
private $expected_transport_security_type = ''; |
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.DebugInfo debug_info = 11;</code> |
||||
*/ |
||||
private $debug_info = null; |
||||
/** |
||||
* Server should not see a request with this set. |
||||
* |
||||
* Generated from protobuf field <code>bool server_die = 12;</code> |
||||
*/ |
||||
private $server_die = false; |
||||
/** |
||||
* Generated from protobuf field <code>string binary_error_details = 13;</code> |
||||
*/ |
||||
private $binary_error_details = ''; |
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.ErrorStatus expected_error = 14;</code> |
||||
*/ |
||||
private $expected_error = null; |
||||
/** |
||||
* Amount to sleep when invoking server |
||||
* |
||||
* Generated from protobuf field <code>int32 server_sleep_us = 15;</code> |
||||
*/ |
||||
private $server_sleep_us = 0; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool echo_deadline = 1;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getEchoDeadline() |
||||
{ |
||||
return $this->echo_deadline; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool echo_deadline = 1;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setEchoDeadline($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->echo_deadline = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 client_cancel_after_us = 2;</code> |
||||
* @return int |
||||
*/ |
||||
public function getClientCancelAfterUs() |
||||
{ |
||||
return $this->client_cancel_after_us; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 client_cancel_after_us = 2;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setClientCancelAfterUs($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->client_cancel_after_us = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 server_cancel_after_us = 3;</code> |
||||
* @return int |
||||
*/ |
||||
public function getServerCancelAfterUs() |
||||
{ |
||||
return $this->server_cancel_after_us; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 server_cancel_after_us = 3;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setServerCancelAfterUs($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->server_cancel_after_us = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool echo_metadata = 4;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getEchoMetadata() |
||||
{ |
||||
return $this->echo_metadata; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool echo_metadata = 4;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setEchoMetadata($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->echo_metadata = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool check_auth_context = 5;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getCheckAuthContext() |
||||
{ |
||||
return $this->check_auth_context; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool check_auth_context = 5;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setCheckAuthContext($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->check_auth_context = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 response_message_length = 6;</code> |
||||
* @return int |
||||
*/ |
||||
public function getResponseMessageLength() |
||||
{ |
||||
return $this->response_message_length; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int32 response_message_length = 6;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setResponseMessageLength($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->response_message_length = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool echo_peer = 7;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getEchoPeer() |
||||
{ |
||||
return $this->echo_peer; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool echo_peer = 7;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setEchoPeer($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->echo_peer = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* will force check_auth_context. |
||||
* |
||||
* Generated from protobuf field <code>string expected_client_identity = 8;</code> |
||||
* @return string |
||||
*/ |
||||
public function getExpectedClientIdentity() |
||||
{ |
||||
return $this->expected_client_identity; |
||||
} |
||||
|
||||
/** |
||||
* will force check_auth_context. |
||||
* |
||||
* Generated from protobuf field <code>string expected_client_identity = 8;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setExpectedClientIdentity($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->expected_client_identity = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool skip_cancelled_check = 9;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getSkipCancelledCheck() |
||||
{ |
||||
return $this->skip_cancelled_check; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>bool skip_cancelled_check = 9;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setSkipCancelledCheck($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->skip_cancelled_check = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string expected_transport_security_type = 10;</code> |
||||
* @return string |
||||
*/ |
||||
public function getExpectedTransportSecurityType() |
||||
{ |
||||
return $this->expected_transport_security_type; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string expected_transport_security_type = 10;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setExpectedTransportSecurityType($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->expected_transport_security_type = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.DebugInfo debug_info = 11;</code> |
||||
* @return \Grpc\Testing\DebugInfo |
||||
*/ |
||||
public function getDebugInfo() |
||||
{ |
||||
return $this->debug_info; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.DebugInfo debug_info = 11;</code> |
||||
* @param \Grpc\Testing\DebugInfo $var |
||||
* @return $this |
||||
*/ |
||||
public function setDebugInfo($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\DebugInfo::class); |
||||
$this->debug_info = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Server should not see a request with this set. |
||||
* |
||||
* Generated from protobuf field <code>bool server_die = 12;</code> |
||||
* @return bool |
||||
*/ |
||||
public function getServerDie() |
||||
{ |
||||
return $this->server_die; |
||||
} |
||||
|
||||
/** |
||||
* Server should not see a request with this set. |
||||
* |
||||
* Generated from protobuf field <code>bool server_die = 12;</code> |
||||
* @param bool $var |
||||
* @return $this |
||||
*/ |
||||
public function setServerDie($var) |
||||
{ |
||||
GPBUtil::checkBool($var); |
||||
$this->server_die = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string binary_error_details = 13;</code> |
||||
* @return string |
||||
*/ |
||||
public function getBinaryErrorDetails() |
||||
{ |
||||
return $this->binary_error_details; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string binary_error_details = 13;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setBinaryErrorDetails($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->binary_error_details = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.ErrorStatus expected_error = 14;</code> |
||||
* @return \Grpc\Testing\ErrorStatus |
||||
*/ |
||||
public function getExpectedError() |
||||
{ |
||||
return $this->expected_error; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>.grpc.testing.ErrorStatus expected_error = 14;</code> |
||||
* @param \Grpc\Testing\ErrorStatus $var |
||||
* @return $this |
||||
*/ |
||||
public function setExpectedError($var) |
||||
{ |
||||
GPBUtil::checkMessage($var, \Grpc\Testing\ErrorStatus::class); |
||||
$this->expected_error = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Amount to sleep when invoking server |
||||
* |
||||
* Generated from protobuf field <code>int32 server_sleep_us = 15;</code> |
||||
* @return int |
||||
*/ |
||||
public function getServerSleepUs() |
||||
{ |
||||
return $this->server_sleep_us; |
||||
} |
||||
|
||||
/** |
||||
* Amount to sleep when invoking server |
||||
* |
||||
* Generated from protobuf field <code>int32 server_sleep_us = 15;</code> |
||||
* @param int $var |
||||
* @return $this |
||||
*/ |
||||
public function setServerSleepUs($var) |
||||
{ |
||||
GPBUtil::checkInt32($var); |
||||
$this->server_sleep_us = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,23 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/compiler_test.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.Response</code> |
||||
*/ |
||||
class Response extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\CompilerTest::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,101 @@ |
||||
<?php |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/echo_messages.proto |
||||
|
||||
namespace Grpc\Testing; |
||||
|
||||
use Google\Protobuf\Internal\GPBType; |
||||
use Google\Protobuf\Internal\RepeatedField; |
||||
use Google\Protobuf\Internal\GPBUtil; |
||||
|
||||
/** |
||||
* Generated from protobuf message <code>grpc.testing.ResponseParams</code> |
||||
*/ |
||||
class ResponseParams extends \Google\Protobuf\Internal\Message |
||||
{ |
||||
/** |
||||
* Generated from protobuf field <code>int64 request_deadline = 1;</code> |
||||
*/ |
||||
private $request_deadline = 0; |
||||
/** |
||||
* Generated from protobuf field <code>string host = 2;</code> |
||||
*/ |
||||
private $host = ''; |
||||
/** |
||||
* Generated from protobuf field <code>string peer = 3;</code> |
||||
*/ |
||||
private $peer = ''; |
||||
|
||||
public function __construct() { |
||||
\GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce(); |
||||
parent::__construct(); |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 request_deadline = 1;</code> |
||||
* @return int|string |
||||
*/ |
||||
public function getRequestDeadline() |
||||
{ |
||||
return $this->request_deadline; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>int64 request_deadline = 1;</code> |
||||
* @param int|string $var |
||||
* @return $this |
||||
*/ |
||||
public function setRequestDeadline($var) |
||||
{ |
||||
GPBUtil::checkInt64($var); |
||||
$this->request_deadline = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string host = 2;</code> |
||||
* @return string |
||||
*/ |
||||
public function getHost() |
||||
{ |
||||
return $this->host; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string host = 2;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setHost($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->host = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string peer = 3;</code> |
||||
* @return string |
||||
*/ |
||||
public function getPeer() |
||||
{ |
||||
return $this->peer; |
||||
} |
||||
|
||||
/** |
||||
* Generated from protobuf field <code>string peer = 3;</code> |
||||
* @param string $var |
||||
* @return $this |
||||
*/ |
||||
public function setPeer($var) |
||||
{ |
||||
GPBUtil::checkString($var, True); |
||||
$this->peer = $var; |
||||
|
||||
return $this; |
||||
} |
||||
|
||||
} |
||||
|
@ -0,0 +1,97 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2016 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// File detached comment 1 |
||||
// |
||||
// File detached comment 2 |
||||
// |
||||
// File leading comment 1 |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
* ServiceA detached comment 1 |
||||
* |
||||
* ServiceA detached comment 2 |
||||
* |
||||
* ServiceA leading comment 1 |
||||
*/ |
||||
class ServiceAClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* MethodA1 leading comment 1 |
||||
* @param \Grpc\Testing\Request $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function MethodA1(\Grpc\Testing\Request $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.ServiceA/MethodA1', |
||||
$argument, |
||||
['\Grpc\Testing\Response', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* MethodA2 detached leading comment 1 |
||||
* |
||||
* Method A2 leading comment 1 |
||||
* Method A2 leading comment 2 |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function MethodA2($metadata = [], $options = []) { |
||||
return $this->_clientStreamRequest('/grpc.testing.ServiceA/MethodA2', |
||||
['\Grpc\Testing\Response','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* Method A3 leading comment 1 |
||||
* @param \Grpc\Testing\Request $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function MethodA3(\Grpc\Testing\Request $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_serverStreamRequest('/grpc.testing.ServiceA/MethodA3', |
||||
$argument, |
||||
['\Grpc\Testing\Response', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* Method A4 leading comment 1 |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function MethodA4($metadata = [], $options = []) { |
||||
return $this->_bidiRequest('/grpc.testing.ServiceA/MethodA4', |
||||
['\Grpc\Testing\Response','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,54 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2016 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// File detached comment 1 |
||||
// |
||||
// File detached comment 2 |
||||
// |
||||
// File leading comment 1 |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
* ServiceB leading comment 1 |
||||
*/ |
||||
class ServiceBClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* MethodB1 leading comment 1 |
||||
* @param \Grpc\Testing\Request $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function MethodB1(\Grpc\Testing\Request $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.ServiceB/MethodB1', |
||||
$argument, |
||||
['\Grpc\Testing\Response', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,152 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015-2016 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
* A simple service to test the various types of RPCs and experiment with |
||||
* performance with various types of payload. |
||||
*/ |
||||
class TestServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* One empty request followed by one empty response. |
||||
* @param \Grpc\Testing\PBEmpty $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function EmptyCall(\Grpc\Testing\PBEmpty $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.TestService/EmptyCall', |
||||
$argument, |
||||
['\Grpc\Testing\PBEmpty', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* One request followed by one response. |
||||
* @param \Grpc\Testing\SimpleRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function UnaryCall(\Grpc\Testing\SimpleRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.TestService/UnaryCall', |
||||
$argument, |
||||
['\Grpc\Testing\SimpleResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* One request followed by one response. Response has cache control |
||||
* headers set such that a caching HTTP proxy (such as GFE) can |
||||
* satisfy subsequent requests. |
||||
* @param \Grpc\Testing\SimpleRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function CacheableUnaryCall(\Grpc\Testing\SimpleRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.TestService/CacheableUnaryCall', |
||||
$argument, |
||||
['\Grpc\Testing\SimpleResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* One request followed by a sequence of responses (streamed download). |
||||
* The server returns the payload with client desired type and sizes. |
||||
* @param \Grpc\Testing\StreamingOutputCallRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function StreamingOutputCall(\Grpc\Testing\StreamingOutputCallRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_serverStreamRequest('/grpc.testing.TestService/StreamingOutputCall', |
||||
$argument, |
||||
['\Grpc\Testing\StreamingOutputCallResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* A sequence of requests followed by one response (streamed upload). |
||||
* The server returns the aggregated size of client payload as the result. |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function StreamingInputCall($metadata = [], $options = []) { |
||||
return $this->_clientStreamRequest('/grpc.testing.TestService/StreamingInputCall', |
||||
['\Grpc\Testing\StreamingInputCallResponse','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* A sequence of requests with each request served by the server immediately. |
||||
* As one request could lead to multiple responses, this interface |
||||
* demonstrates the idea of full duplexing. |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function FullDuplexCall($metadata = [], $options = []) { |
||||
return $this->_bidiRequest('/grpc.testing.TestService/FullDuplexCall', |
||||
['\Grpc\Testing\StreamingOutputCallResponse','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* A sequence of requests followed by a sequence of responses. |
||||
* The server buffers all the client requests and then serves them in order. A |
||||
* stream of responses are returned to the client when the server starts with |
||||
* first request. |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function HalfDuplexCall($metadata = [], $options = []) { |
||||
return $this->_bidiRequest('/grpc.testing.TestService/HalfDuplexCall', |
||||
['\Grpc\Testing\StreamingOutputCallResponse','decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
/** |
||||
* The test server will not implement this method. It will be used |
||||
* to test the behavior when clients call unimplemented methods. |
||||
* @param \Grpc\Testing\PBEmpty $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function UnimplementedCall(\Grpc\Testing\PBEmpty $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.TestService/UnimplementedCall', |
||||
$argument, |
||||
['\Grpc\Testing\PBEmpty', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,47 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
*/ |
||||
class UnimplementedEchoServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* @param \Grpc\Testing\EchoRequest $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function Unimplemented(\Grpc\Testing\EchoRequest $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.UnimplementedEchoService/Unimplemented', |
||||
$argument, |
||||
['\Grpc\Testing\EchoResponse', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,53 @@ |
||||
<?php |
||||
// GENERATED CODE -- DO NOT EDIT! |
||||
|
||||
// Original file comments: |
||||
// Copyright 2015-2016 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
// |
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
// |
||||
namespace Grpc\Testing; |
||||
|
||||
/** |
||||
* A simple service NOT implemented at servers so clients can test for |
||||
* that case. |
||||
*/ |
||||
class UnimplementedServiceClient extends \Grpc\BaseStub { |
||||
|
||||
/** |
||||
* @param string $hostname hostname |
||||
* @param array $opts channel options |
||||
* @param \Grpc\Channel $channel (optional) re-use channel object |
||||
*/ |
||||
public function __construct($hostname, $opts, $channel = null) { |
||||
parent::__construct($hostname, $opts, $channel); |
||||
} |
||||
|
||||
/** |
||||
* A call that no server should implement |
||||
* @param \Grpc\Testing\PBEmpty $argument input argument |
||||
* @param array $metadata metadata |
||||
* @param array $options call options |
||||
*/ |
||||
public function UnimplementedCall(\Grpc\Testing\PBEmpty $argument, |
||||
$metadata = [], $options = []) { |
||||
return $this->_simpleRequest('/grpc.testing.UnimplementedService/UnimplementedCall', |
||||
$argument, |
||||
['\Grpc\Testing\PBEmpty', 'decode'], |
||||
$metadata, $options); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,26 @@ |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
|
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
syntax = "proto3"; |
||||
|
||||
import "src/proto/grpc/testing/control.proto"; |
||||
|
||||
package grpc.testing; |
||||
|
||||
service ReportQpsScenarioService { |
||||
// Report results of a QPS test benchmark scenario. |
||||
rpc ReportScenario(ScenarioResult) returns (Void); |
||||
} |
@ -0,0 +1,45 @@ |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
|
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
syntax = "proto3"; |
||||
|
||||
import "src/proto/grpc/testing/control.proto"; |
||||
|
||||
package grpc.testing; |
||||
|
||||
service WorkerService { |
||||
// Start server with specified workload. |
||||
// First request sent specifies the ServerConfig followed by ServerStatus |
||||
// response. After that, a "Mark" can be sent anytime to request the latest |
||||
// stats. Closing the stream will initiate shutdown of the test server |
||||
// and once the shutdown has finished, the OK status is sent to terminate |
||||
// this RPC. |
||||
rpc RunServer(stream ServerArgs) returns (stream ServerStatus); |
||||
|
||||
// Start client with specified workload. |
||||
// First request sent specifies the ClientConfig followed by ClientStatus |
||||
// response. After that, a "Mark" can be sent anytime to request the latest |
||||
// stats. Closing the stream will initiate shutdown of the test client |
||||
// and once the shutdown has finished, the OK status is sent to terminate |
||||
// this RPC. |
||||
rpc RunClient(stream ClientArgs) returns (stream ClientStatus); |
||||
|
||||
// Just return the core count - unary call |
||||
rpc CoreCount(CoreRequest) returns (CoreResponse); |
||||
|
||||
// Quit this worker |
||||
rpc QuitWorker(Void) returns (Void); |
||||
} |
@ -0,0 +1,33 @@ |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/core/stats.proto |
||||
|
||||
require 'google/protobuf' |
||||
|
||||
Google::Protobuf::DescriptorPool.generated_pool.build do |
||||
add_message "grpc.core.Bucket" do |
||||
optional :start, :double, 1 |
||||
optional :count, :uint64, 2 |
||||
end |
||||
add_message "grpc.core.Histogram" do |
||||
repeated :buckets, :message, 1, "grpc.core.Bucket" |
||||
end |
||||
add_message "grpc.core.Metric" do |
||||
optional :name, :string, 1 |
||||
oneof :value do |
||||
optional :count, :uint64, 10 |
||||
optional :histogram, :message, 11, "grpc.core.Histogram" |
||||
end |
||||
end |
||||
add_message "grpc.core.Stats" do |
||||
repeated :metrics, :message, 1, "grpc.core.Metric" |
||||
end |
||||
end |
||||
|
||||
module Grpc |
||||
module Core |
||||
Bucket = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Bucket").msgclass |
||||
Histogram = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Histogram").msgclass |
||||
Metric = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Metric").msgclass |
||||
Stats = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.core.Stats").msgclass |
||||
end |
||||
end |
@ -1,10 +1,9 @@ |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/services.proto |
||||
# source: src/proto/grpc/testing/benchmark_service.proto |
||||
|
||||
require 'google/protobuf' |
||||
|
||||
require 'src/proto/grpc/testing/messages_pb' |
||||
require 'src/proto/grpc/testing/control_pb' |
||||
Google::Protobuf::DescriptorPool.generated_pool.build do |
||||
end |
||||
|
@ -0,0 +1,56 @@ |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# Source: src/proto/grpc/testing/benchmark_service.proto for package 'grpc.testing' |
||||
# Original file comments: |
||||
# Copyright 2015 gRPC authors. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
# An integration test service that covers all the method signature permutations |
||||
# of unary/streaming requests/responses. |
||||
|
||||
require 'grpc' |
||||
require 'src/proto/grpc/testing/benchmark_service_pb' |
||||
|
||||
module Grpc |
||||
module Testing |
||||
module BenchmarkService |
||||
class Service |
||||
|
||||
include GRPC::GenericService |
||||
|
||||
self.marshal_class_method = :encode |
||||
self.unmarshal_class_method = :decode |
||||
self.service_name = 'grpc.testing.BenchmarkService' |
||||
|
||||
# One request followed by one response. |
||||
# The server returns the client payload as-is. |
||||
rpc :UnaryCall, SimpleRequest, SimpleResponse |
||||
# Repeated sequence of one request followed by one response. |
||||
# Should be called streaming ping-pong |
||||
# The server returns the client payload as-is on each response |
||||
rpc :StreamingCall, stream(SimpleRequest), stream(SimpleResponse) |
||||
# Single-sided unbounded streaming from client to server |
||||
# The server returns the client payload as-is once the client does WritesDone |
||||
rpc :StreamingFromClient, stream(SimpleRequest), SimpleResponse |
||||
# Single-sided unbounded streaming from server to client |
||||
# The server repeatedly returns the client payload as-is |
||||
rpc :StreamingFromServer, SimpleRequest, stream(SimpleResponse) |
||||
# Two-sided unbounded streaming between server to client |
||||
# Both sides send the content of their own choice to the other |
||||
rpc :StreamingBothWays, stream(SimpleRequest), stream(SimpleResponse) |
||||
end |
||||
|
||||
Stub = Service.rpc_stub_class |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,13 @@ |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/report_qps_scenario_service.proto |
||||
|
||||
require 'google/protobuf' |
||||
|
||||
require 'src/proto/grpc/testing/control_pb' |
||||
Google::Protobuf::DescriptorPool.generated_pool.build do |
||||
end |
||||
|
||||
module Grpc |
||||
module Testing |
||||
end |
||||
end |
@ -0,0 +1,42 @@ |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# Source: src/proto/grpc/testing/report_qps_scenario_service.proto for package 'grpc.testing' |
||||
# Original file comments: |
||||
# Copyright 2015 gRPC authors. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
# An integration test service that covers all the method signature permutations |
||||
# of unary/streaming requests/responses. |
||||
|
||||
require 'grpc' |
||||
require 'src/proto/grpc/testing/report_qps_scenario_service_pb' |
||||
|
||||
module Grpc |
||||
module Testing |
||||
module ReportQpsScenarioService |
||||
class Service |
||||
|
||||
include GRPC::GenericService |
||||
|
||||
self.marshal_class_method = :encode |
||||
self.unmarshal_class_method = :decode |
||||
self.service_name = 'grpc.testing.ReportQpsScenarioService' |
||||
|
||||
# Report results of a QPS test benchmark scenario. |
||||
rpc :ReportScenario, ScenarioResult, Void |
||||
end |
||||
|
||||
Stub = Service.rpc_stub_class |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,13 @@ |
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: src/proto/grpc/testing/worker_service.proto |
||||
|
||||
require 'google/protobuf' |
||||
|
||||
require 'src/proto/grpc/testing/control_pb' |
||||
Google::Protobuf::DescriptorPool.generated_pool.build do |
||||
end |
||||
|
||||
module Grpc |
||||
module Testing |
||||
end |
||||
end |
Loading…
Reference in new issue