protobuf-rpc-register 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/protobuf/rpc/clients/base.rb +3 -4
- data/lib/protobuf/rpc/register/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70c633bbbfe53a84ac4c05ce177c5a65a7dc9ffa
|
4
|
+
data.tar.gz: 1469f09c7cdcdfa3d9c889de677bc3fc56289ef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d318ea876594e2fb6182cce82573acdf7a60458f77de202635bf3247ec5c9e4b93c07b2a145dafd7ecba76f9937645b28f5466f635375665a5b8199a5e3bbfe
|
7
|
+
data.tar.gz: a7cd3b378daf65dc5a24dc738afd9758c5ceebdf732839ea3fbb182a11c53b2e6942f0f22a214cedf0881a86081b1d4ff62ab69a490779011add73ee0053920e
|
data/.gitignore
CHANGED
@@ -6,9 +6,8 @@ module Protobuf
|
|
6
6
|
|
7
7
|
mattr_reader(:mutex) { Mutex.new }
|
8
8
|
|
9
|
-
def initialize(
|
10
|
-
@
|
11
|
-
@namespace = options[:namespace]
|
9
|
+
def initialize(host: nil, port: nil, timeout: 1, stdout: STDOUT, stderr: STDERR, namespace: nil)
|
10
|
+
@namespace = namespace
|
12
11
|
@logger ||= Logger.new(stdout)
|
13
12
|
@error_logger ||= Logger.new(stderr)
|
14
13
|
end
|
@@ -19,7 +18,7 @@ module Protobuf
|
|
19
18
|
names = self.class.name.split('::')
|
20
19
|
svc_class = [names[0..-3], 'Services', names[-1]].flatten.join('::')
|
21
20
|
|
22
|
-
Object.const_get(svc_class).client(
|
21
|
+
Object.const_get(svc_class).client(host: host, port: port, timeout: timeout).send(method, Serializer.dump(msg)) do |c|
|
23
22
|
c.on_success do |rpc_compressed_message|
|
24
23
|
res = Protobuf::Rpc::Serializer.load(rpc_compressed_message)
|
25
24
|
end
|