mirror of https://github.com/grpc/grpc.git
- Adds a dependency to protobuf-ruby in the gemfile - Updates math.proto to proto3 - Updates math server and client to use protoc protos - Updates interop server and client to use protoc protos Also - Fixes/Updates the noproto samples TESTED: math_server and math_client can communicate locally. Change on 2015/01/07 by temiola <temiola@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=83483448pull/1/merge
parent
228ad9b853
commit
6e48a4258a
22 changed files with 474 additions and 322 deletions
@ -1,12 +1,4 @@ |
||||
source 'https://rubygems.org' |
||||
|
||||
# Modify this when working locally, see README.md |
||||
# e.g, |
||||
# gem 'beefcake', path: "/usr/local/google/repos/beefcake" |
||||
# |
||||
# The default value is what's used for gRPC ruby's GCE configuration |
||||
# |
||||
gem 'beefcake', path: "/var/local/git/beefcake" |
||||
|
||||
# Specify your gem's dependencies in grpc.gemspec |
||||
gemspec |
||||
|
@ -1,14 +0,0 @@ |
||||
## Generated from net/proto2/bridge/proto/message_set.proto for proto2.bridge |
||||
require 'beefcake' |
||||
|
||||
module Proto2 |
||||
module Bridge |
||||
|
||||
class MessageSet |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class MessageSet |
||||
end |
||||
end |
||||
end |
@ -1,12 +0,0 @@ |
||||
## Generated from net/proto2/proto/empty.proto for proto2 |
||||
require 'beefcake' |
||||
|
||||
module Proto2 |
||||
|
||||
class Empty |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class Empty |
||||
end |
||||
end |
@ -0,0 +1,44 @@ |
||||
# Copyright 2014, Google Inc. |
||||
# All rights reserved. |
||||
# |
||||
# Redistribution and use in source and binary forms, with or without |
||||
# modification, are permitted provided that the following conditions are |
||||
# met: |
||||
# |
||||
# * Redistributions of source code must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# * Redistributions in binary form must reproduce the above |
||||
# copyright notice, this list of conditions and the following disclaimer |
||||
# in the documentation and/or other materials provided with the |
||||
# distribution. |
||||
# * Neither the name of Google Inc. nor the names of its |
||||
# contributors may be used to endorse or promote products derived from |
||||
# this software without specific prior written permission. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: test/cpp/interop/empty.proto |
||||
|
||||
require 'google/protobuf' |
||||
|
||||
Google::Protobuf::DescriptorPool.generated_pool.build do |
||||
add_message "grpc.testing.Empty" do |
||||
end |
||||
end |
||||
|
||||
module Grpc |
||||
module Testing |
||||
Empty = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Empty").msgclass |
||||
end |
||||
end |
@ -0,0 +1,86 @@ |
||||
# Copyright 2014, Google Inc. |
||||
# All rights reserved. |
||||
# |
||||
# Redistribution and use in source and binary forms, with or without |
||||
# modification, are permitted provided that the following conditions are |
||||
# met: |
||||
# |
||||
# * Redistributions of source code must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# * Redistributions in binary form must reproduce the above |
||||
# copyright notice, this list of conditions and the following disclaimer |
||||
# in the documentation and/or other materials provided with the |
||||
# distribution. |
||||
# * Neither the name of Google Inc. nor the names of its |
||||
# contributors may be used to endorse or promote products derived from |
||||
# this software without specific prior written permission. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: test/cpp/interop/messages.proto |
||||
|
||||
require 'google/protobuf' |
||||
|
||||
Google::Protobuf::DescriptorPool.generated_pool.build do |
||||
add_message "grpc.testing.Payload" do |
||||
optional :type, :enum, 1, "grpc.testing.PayloadType" |
||||
optional :body, :string, 2 |
||||
end |
||||
add_message "grpc.testing.SimpleRequest" do |
||||
optional :response_type, :enum, 1, "grpc.testing.PayloadType" |
||||
optional :response_size, :int32, 2 |
||||
optional :payload, :message, 3, "grpc.testing.Payload" |
||||
end |
||||
add_message "grpc.testing.SimpleResponse" do |
||||
optional :payload, :message, 1, "grpc.testing.Payload" |
||||
optional :effective_gaia_user_id, :int64, 2 |
||||
end |
||||
add_message "grpc.testing.StreamingInputCallRequest" do |
||||
optional :payload, :message, 1, "grpc.testing.Payload" |
||||
end |
||||
add_message "grpc.testing.StreamingInputCallResponse" do |
||||
optional :aggregated_payload_size, :int32, 1 |
||||
end |
||||
add_message "grpc.testing.ResponseParameters" do |
||||
optional :size, :int32, 1 |
||||
optional :interval_us, :int32, 2 |
||||
end |
||||
add_message "grpc.testing.StreamingOutputCallRequest" do |
||||
optional :response_type, :enum, 1, "grpc.testing.PayloadType" |
||||
repeated :response_parameters, :message, 2, "grpc.testing.ResponseParameters" |
||||
optional :payload, :message, 3, "grpc.testing.Payload" |
||||
end |
||||
add_message "grpc.testing.StreamingOutputCallResponse" do |
||||
optional :payload, :message, 1, "grpc.testing.Payload" |
||||
end |
||||
add_enum "grpc.testing.PayloadType" do |
||||
value :COMPRESSABLE, 0 |
||||
value :UNCOMPRESSABLE, 1 |
||||
value :RANDOM, 2 |
||||
end |
||||
end |
||||
|
||||
module Grpc |
||||
module Testing |
||||
Payload = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.Payload").msgclass |
||||
SimpleRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.SimpleRequest").msgclass |
||||
SimpleResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.SimpleResponse").msgclass |
||||
StreamingInputCallRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingInputCallRequest").msgclass |
||||
StreamingInputCallResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingInputCallResponse").msgclass |
||||
ResponseParameters = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.ResponseParameters").msgclass |
||||
StreamingOutputCallRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingOutputCallRequest").msgclass |
||||
StreamingOutputCallResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.StreamingOutputCallResponse").msgclass |
||||
PayloadType = Google::Protobuf::DescriptorPool.generated_pool.lookup("grpc.testing.PayloadType").enummodule |
||||
end |
||||
end |
@ -0,0 +1,43 @@ |
||||
# Copyright 2014, Google Inc. |
||||
# All rights reserved. |
||||
# |
||||
# Redistribution and use in source and binary forms, with or without |
||||
# modification, are permitted provided that the following conditions are |
||||
# met: |
||||
# |
||||
# * Redistributions of source code must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# * Redistributions in binary form must reproduce the above |
||||
# copyright notice, this list of conditions and the following disclaimer |
||||
# in the documentation and/or other materials provided with the |
||||
# distribution. |
||||
# * Neither the name of Google Inc. nor the names of its |
||||
# contributors may be used to endorse or promote products derived from |
||||
# this software without specific prior written permission. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: test/cpp/interop/test.proto |
||||
|
||||
require 'google/protobuf' |
||||
|
||||
require 'test/cpp/interop/empty' |
||||
require 'test/cpp/interop/messages' |
||||
Google::Protobuf::DescriptorPool.generated_pool.build do |
||||
end |
||||
|
||||
module Grpc |
||||
module Testing |
||||
end |
||||
end |
@ -0,0 +1,59 @@ |
||||
# Copyright 2014, Google Inc. |
||||
# All rights reserved. |
||||
# |
||||
# Redistribution and use in source and binary forms, with or without |
||||
# modification, are permitted provided that the following conditions are |
||||
# met: |
||||
# |
||||
# * Redistributions of source code must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# * Redistributions in binary form must reproduce the above |
||||
# copyright notice, this list of conditions and the following disclaimer |
||||
# in the documentation and/or other materials provided with the |
||||
# distribution. |
||||
# * Neither the name of Google Inc. nor the names of its |
||||
# contributors may be used to endorse or promote products derived from |
||||
# this software without specific prior written permission. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# Source: test/cpp/interop/test.proto for package 'grpc.testing' |
||||
|
||||
require 'grpc' |
||||
require 'test/cpp/interop/test' |
||||
|
||||
module Grpc |
||||
module Testing |
||||
module TestService |
||||
|
||||
# TODO: add proto service documentation here |
||||
class Service |
||||
|
||||
include GRPC::GenericService |
||||
|
||||
self.marshal_class_method = :encode |
||||
self.unmarshal_class_method = :decode |
||||
|
||||
rpc :EmptyCall, Empty, Empty |
||||
rpc :UnaryCall, SimpleRequest, SimpleResponse |
||||
rpc :StreamingOutputCall, StreamingOutputCallRequest, stream(StreamingOutputCallResponse) |
||||
rpc :StreamingInputCall, stream(StreamingInputCallRequest), StreamingInputCallResponse |
||||
rpc :FullDuplexCall, stream(StreamingOutputCallRequest), stream(StreamingOutputCallResponse) |
||||
rpc :HalfDuplexCall, stream(StreamingOutputCallRequest), stream(StreamingOutputCallResponse) |
||||
end |
||||
|
||||
Stub = Service.rpc_stub_class |
||||
end |
||||
end |
||||
end |
@ -1,94 +0,0 @@ |
||||
## Generated from third_party/stubby/testing/proto/messages.proto for grpc.testing |
||||
require 'beefcake' |
||||
|
||||
require 'net/proto2/bridge/proto/message_set.pb' |
||||
|
||||
module Grpc |
||||
module Testing |
||||
|
||||
module PayloadType |
||||
COMPRESSABLE = 0 |
||||
UNCOMPRESSABLE = 1 |
||||
RANDOM = 2 |
||||
end |
||||
|
||||
class Payload |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class SimpleRequest |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class SimpleResponse |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class SimpleContext |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class StreamingInputCallRequest |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class StreamingInputCallResponse |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class ResponseParameters |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class StreamingOutputCallRequest |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class StreamingOutputCallResponse |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class Payload |
||||
optional :type, PayloadType, 1 |
||||
optional :body, :bytes, 2 |
||||
end |
||||
|
||||
class SimpleRequest |
||||
optional :response_type, PayloadType, 1 |
||||
optional :response_size, :int32, 2 |
||||
optional :payload, Payload, 3 |
||||
end |
||||
|
||||
class SimpleResponse |
||||
optional :payload, Payload, 1 |
||||
optional :effective_gaia_user_id, :int64, 2 |
||||
end |
||||
|
||||
class SimpleContext |
||||
optional :value, :string, 1 |
||||
end |
||||
|
||||
class StreamingInputCallRequest |
||||
optional :payload, Payload, 1 |
||||
end |
||||
|
||||
class StreamingInputCallResponse |
||||
optional :aggregated_payload_size, :int32, 1 |
||||
end |
||||
|
||||
class ResponseParameters |
||||
optional :size, :int32, 1 |
||||
optional :interval_us, :int32, 2 |
||||
end |
||||
|
||||
class StreamingOutputCallRequest |
||||
optional :response_type, PayloadType, 1 |
||||
repeated :response_parameters, ResponseParameters, 2 |
||||
optional :payload, Payload, 3 |
||||
end |
||||
|
||||
class StreamingOutputCallResponse |
||||
optional :payload, Payload, 1 |
||||
end |
||||
end |
||||
end |
@ -1,30 +0,0 @@ |
||||
## Generated from third_party/stubby/testing/proto/test.proto for grpc.testing |
||||
require 'beefcake' |
||||
require 'grpc' |
||||
|
||||
require 'third_party/stubby/testing/proto/messages.pb' |
||||
require 'net/proto2/proto/empty.pb' |
||||
|
||||
module Grpc |
||||
module Testing |
||||
|
||||
module TestService |
||||
|
||||
class Service |
||||
include GRPC::GenericService |
||||
|
||||
self.marshal_class_method = :encode |
||||
self.unmarshal_class_method = :decode |
||||
|
||||
rpc :EmptyCall, Proto2::Empty, Proto2::Empty |
||||
rpc :UnaryCall, SimpleRequest, SimpleResponse |
||||
rpc :StreamingOutputCall, StreamingOutputCallRequest, stream(StreamingOutputCallResponse) |
||||
rpc :StreamingInputCall, stream(StreamingInputCallRequest), StreamingInputCallResponse |
||||
rpc :FullDuplexCall, stream(StreamingOutputCallRequest), stream(StreamingOutputCallResponse) |
||||
rpc :HalfDuplexCall, stream(StreamingOutputCallRequest), stream(StreamingOutputCallResponse) |
||||
end |
||||
Stub = Service.rpc_stub_class |
||||
|
||||
end |
||||
end |
||||
end |
@ -1,65 +0,0 @@ |
||||
## Generated from bin/math.proto for math |
||||
require "beefcake" |
||||
require "grpc" |
||||
|
||||
module Math |
||||
|
||||
class DivArgs |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class DivReply |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class FibArgs |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class Num |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class FibReply |
||||
include Beefcake::Message |
||||
end |
||||
|
||||
class DivArgs |
||||
required :dividend, :int64, 1 |
||||
required :divisor, :int64, 2 |
||||
end |
||||
|
||||
class DivReply |
||||
required :quotient, :int64, 1 |
||||
required :remainder, :int64, 2 |
||||
end |
||||
|
||||
class FibArgs |
||||
optional :limit, :int64, 1 |
||||
end |
||||
|
||||
class Num |
||||
required :num, :int64, 1 |
||||
end |
||||
|
||||
class FibReply |
||||
required :count, :int64, 1 |
||||
end |
||||
|
||||
module Math |
||||
|
||||
class Service |
||||
include GRPC::GenericService |
||||
|
||||
self.marshal_class_method = :encode |
||||
self.unmarshal_class_method = :decode |
||||
|
||||
rpc :Div, DivArgs, DivReply |
||||
rpc :DivMany, stream(DivArgs), stream(DivReply) |
||||
rpc :Fib, FibArgs, stream(Num) |
||||
rpc :Sum, stream(Num), Num |
||||
end |
||||
Stub = Service.rpc_stub_class |
||||
|
||||
end |
||||
end |
@ -0,0 +1,61 @@ |
||||
# Copyright 2014, Google Inc. |
||||
# All rights reserved. |
||||
# |
||||
# Redistribution and use in source and binary forms, with or without |
||||
# modification, are permitted provided that the following conditions are |
||||
# met: |
||||
# |
||||
# * Redistributions of source code must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# * Redistributions in binary form must reproduce the above |
||||
# copyright notice, this list of conditions and the following disclaimer |
||||
# in the documentation and/or other materials provided with the |
||||
# distribution. |
||||
# * Neither the name of Google Inc. nor the names of its |
||||
# contributors may be used to endorse or promote products derived from |
||||
# this software without specific prior written permission. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# source: math.proto |
||||
|
||||
require 'google/protobuf' |
||||
|
||||
Google::Protobuf::DescriptorPool.generated_pool.build do |
||||
add_message "math.DivArgs" do |
||||
optional :dividend, :int64, 1 |
||||
optional :divisor, :int64, 2 |
||||
end |
||||
add_message "math.DivReply" do |
||||
optional :quotient, :int64, 1 |
||||
optional :remainder, :int64, 2 |
||||
end |
||||
add_message "math.FibArgs" do |
||||
optional :limit, :int64, 1 |
||||
end |
||||
add_message "math.Num" do |
||||
optional :num, :int64, 1 |
||||
end |
||||
add_message "math.FibReply" do |
||||
optional :count, :int64, 1 |
||||
end |
||||
end |
||||
|
||||
module Math |
||||
DivArgs = Google::Protobuf::DescriptorPool.generated_pool.lookup("math.DivArgs").msgclass |
||||
DivReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("math.DivReply").msgclass |
||||
FibArgs = Google::Protobuf::DescriptorPool.generated_pool.lookup("math.FibArgs").msgclass |
||||
Num = Google::Protobuf::DescriptorPool.generated_pool.lookup("math.Num").msgclass |
||||
FibReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("math.FibReply").msgclass |
||||
end |
@ -0,0 +1,55 @@ |
||||
# Copyright 2014, Google Inc. |
||||
# All rights reserved. |
||||
# |
||||
# Redistribution and use in source and binary forms, with or without |
||||
# modification, are permitted provided that the following conditions are |
||||
# met: |
||||
# |
||||
# * Redistributions of source code must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# * Redistributions in binary form must reproduce the above |
||||
# copyright notice, this list of conditions and the following disclaimer |
||||
# in the documentation and/or other materials provided with the |
||||
# distribution. |
||||
# * Neither the name of Google Inc. nor the names of its |
||||
# contributors may be used to endorse or promote products derived from |
||||
# this software without specific prior written permission. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
# Source: math.proto for package 'math' |
||||
|
||||
require 'grpc' |
||||
require 'math' |
||||
|
||||
module Math |
||||
module Math |
||||
|
||||
# TODO: add proto service documentation here |
||||
class Service |
||||
|
||||
include GRPC::GenericService |
||||
|
||||
self.marshal_class_method = :encode |
||||
self.unmarshal_class_method = :decode |
||||
|
||||
rpc :Div, DivArgs, DivReply |
||||
rpc :DivMany, stream(DivArgs), stream(DivReply) |
||||
rpc :Fib, FibArgs, stream(Num) |
||||
rpc :Sum, stream(Num), Num |
||||
end |
||||
|
||||
Stub = Service.rpc_stub_class |
||||
end |
||||
end |
Loading…
Reference in new issue