services.proto 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. }
  28. service WorkerService {
  29. // Start server with specified workload.
  30. // First request sent specifies the ServerConfig followed by ServerStatus
  31. // response. After that, a "Mark" can be sent anytime to request the latest
  32. // stats. Closing the stream will initiate shutdown of the test server
  33. // and once the shutdown has finished, the OK status is sent to terminate
  34. // this RPC.
  35. rpc RunServer(stream ServerArgs) returns (stream ServerStatus);
  36. // Start client with specified workload.
  37. // First request sent specifies the ClientConfig followed by ClientStatus
  38. // response. After that, a "Mark" can be sent anytime to request the latest
  39. // stats. Closing the stream will initiate shutdown of the test client
  40. // and once the shutdown has finished, the OK status is sent to terminate
  41. // this RPC.
  42. rpc RunClient(stream ClientArgs) returns (stream ClientStatus);
  43. // Just return the core count - unary call
  44. rpc CoreCount(CoreRequest) returns (CoreResponse);
  45. // Quit this worker
  46. rpc QuitWorker(Void) returns (Void);
  47. }