Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

60 řádky
2.3 KiB

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