route_guide_services_pb.rb 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Generated by the protocol buffer compiler. DO NOT EDIT!
  2. # Source: route_guide.proto for package 'routeguide'
  3. # Original file comments:
  4. # Copyright 2015 gRPC authors.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. #
  18. require 'grpc'
  19. require 'route_guide_pb'
  20. module Routeguide
  21. module RouteGuide
  22. # Interface exported by the server.
  23. class Service
  24. include GRPC::GenericService
  25. self.marshal_class_method = :encode
  26. self.unmarshal_class_method = :decode
  27. self.service_name = 'routeguide.RouteGuide'
  28. # A simple RPC.
  29. #
  30. # Obtains the feature at a given position.
  31. #
  32. # A feature with an empty name is returned if there's no feature at the given
  33. # position.
  34. rpc :GetFeature, Point, Feature
  35. # A server-to-client streaming RPC.
  36. #
  37. # Obtains the Features available within the given Rectangle. Results are
  38. # streamed rather than returned at once (e.g. in a response message with a
  39. # repeated field), as the rectangle may cover a large area and contain a
  40. # huge number of features.
  41. rpc :ListFeatures, Rectangle, stream(Feature)
  42. # A client-to-server streaming RPC.
  43. #
  44. # Accepts a stream of Points on a route being traversed, returning a
  45. # RouteSummary when traversal is completed.
  46. rpc :RecordRoute, stream(Point), RouteSummary
  47. # A Bidirectional streaming RPC.
  48. #
  49. # Accepts a stream of RouteNotes sent while a route is being traversed,
  50. # while receiving other RouteNotes (e.g. from other users).
  51. rpc :RouteChat, stream(RouteNote), stream(RouteNote)
  52. end
  53. Stub = Service.rpc_stub_class
  54. end
  55. end