1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
## 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
|