message.proto 930 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. syntax = "proto3";
  2. option java_multiple_files = true;
  3. option java_package = "io.grpc.examples.helloworld";
  4. option java_outer_classname = "HelloWorldProto";
  5. option objc_class_prefix = "HLW";
  6. package message;
  7. // The greeting service definition.
  8. service Message {
  9. rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
  10. rpc sendMessage (MessageRequest) returns (MessageResponse) {}
  11. rpc HandleMessage (Request) returns (stream Response) {}
  12. rpc streamMessage (stream MessageRequest) returns (MessageResponse) {}
  13. rpc sendMessageStream (stream MessageRequest) returns (stream MessageResponse) {}
  14. }
  15. message Request {
  16. string id = 1;
  17. string message = 2;
  18. }
  19. message Response {
  20. string id = 1;
  21. string message = 2;
  22. }
  23. message MessageRequest {
  24. string message = 1;
  25. }
  26. message MessageResponse {
  27. string message = 1;
  28. }
  29. message HealthCheckRequest {}
  30. message HealthCheckResponse {
  31. string status = 1;
  32. }