dryad-cluster 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/lib/dryad/cluster.rb +2 -2
- data/lib/dryad/cluster/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49215a5ff2b15fae0c400f02242e8aeabea3da6d2c3362ca595a894a15e3c23e
|
4
|
+
data.tar.gz: 3c36c521649fd58aa1b2cf79963b35a6556a693f82e7dec984419f6638641503
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cf023db097e0c91af9d49c4be222592ce5ab7287a43743ef1158f4cc37f2697f6b5059dd802ecdf2ac6cee0fce2c0f426a5263adb11adac21a6d008da5e5497
|
7
|
+
data.tar.gz: 594d3f13d20523919c11543bf2db7dd7f933aabc2df314cbdb417d7d6badbb56a9c6ed84ac2c4ab59a4b002418b074221674b49732d6b90a70d44f1cb380ac20
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dryad-cluster (0.2.
|
4
|
+
dryad-cluster (0.2.3)
|
5
5
|
concurrent-ruby (~> 1.1, >= 1.1.5)
|
6
|
-
dryad-core (= 0.2.
|
6
|
+
dryad-core (= 0.2.3)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -14,10 +14,10 @@ GEM
|
|
14
14
|
diplomat (2.2.4)
|
15
15
|
deep_merge (~> 1.0, >= 1.0.1)
|
16
16
|
faraday (~> 0.9)
|
17
|
-
dryad-consul (0.2.
|
17
|
+
dryad-consul (0.2.3)
|
18
18
|
diplomat (~> 2.2, >= 2.2.4)
|
19
|
-
dryad-core (= 0.2.
|
20
|
-
dryad-core (0.2.
|
19
|
+
dryad-core (= 0.2.3)
|
20
|
+
dryad-core (0.2.3)
|
21
21
|
faraday (0.15.4)
|
22
22
|
multipart-post (>= 1.2, < 3)
|
23
23
|
multipart-post (2.1.1)
|
data/lib/dryad/cluster.rb
CHANGED
@@ -9,7 +9,6 @@ module Dryad
|
|
9
9
|
class NoServicesError < Error; end
|
10
10
|
|
11
11
|
class << self
|
12
|
-
REGISTRY = Object.const_get(Dryad.configuration.registry)
|
13
12
|
CLUSTERS = {}
|
14
13
|
|
15
14
|
def round_robin(schema, service_name)
|
@@ -29,7 +28,8 @@ module Dryad
|
|
29
28
|
end
|
30
29
|
|
31
30
|
def sorted_instances(service_name, schema, groups)
|
32
|
-
|
31
|
+
registry = Object.const_get(Dryad.configuration.registry)
|
32
|
+
sis = registry.service_instances(service_name, schema, groups)
|
33
33
|
sis.sort {|a, b| "#{a.address}:#{a.port}" <=> "#{b.address}:#{b.port}"}
|
34
34
|
end
|
35
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dryad-cluster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pan Jie
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dryad-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2.
|
19
|
+
version: 0.2.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2.
|
26
|
+
version: 0.2.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: concurrent-ruby
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,7 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
|
-
|
128
|
+
rubyforge_project:
|
129
|
+
rubygems_version: 2.7.9
|
129
130
|
signing_key:
|
130
131
|
specification_version: 4
|
131
132
|
summary: Dryad cluster library.
|