nsq-cluster 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/nsq-cluster +3 -1
- data/lib/nsq-cluster/nsqd.rb +8 -3
- data/lib/nsq-cluster/nsqlookupd.rb +8 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6b7eaacf056401979d86350a7fe6671ac938e69
|
4
|
+
data.tar.gz: 8ef918b8ead29882028f73f38fbf746bdddb306c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b75e759f4ac438a3d8dfb02f06a9770eb55422298ac4f399f39496841b194a9d6ef07d4da5e788b95fc8a39b34e4dc6f574e0fa4454891140fcea43784fd05f9
|
7
|
+
data.tar.gz: 0195b5c6014f498a8eacdc118e0aebabba95a92ed68b6dc1f72b29cc503baf535b80d5c7e7b89543c38cd58b3bcb2c5ff47da4a51a72e7e59ee3ce94c51f7f8e
|
data/bin/nsq-cluster
CHANGED
data/lib/nsq-cluster/nsqd.rb
CHANGED
@@ -6,7 +6,7 @@ class Nsqd < ProcessWrapper
|
|
6
6
|
include HTTPWrapper
|
7
7
|
|
8
8
|
|
9
|
-
attr_reader :host, :tcp_port, :http_port, :id
|
9
|
+
attr_reader :host, :tcp_port, :http_port, :id, :base_port
|
10
10
|
|
11
11
|
|
12
12
|
def initialize(opts = {}, verbose = false)
|
@@ -14,8 +14,13 @@ class Nsqd < ProcessWrapper
|
|
14
14
|
|
15
15
|
@id = opts.delete(:id) || 0
|
16
16
|
@host = opts.delete(:host) || '127.0.0.1'
|
17
|
-
|
18
|
-
|
17
|
+
|
18
|
+
# Use a non-standard nsqd port by default so as to not conflict with any
|
19
|
+
# local instances. This is helpful when running tests!
|
20
|
+
@base_port = opts.delete(:base_port) || 4250
|
21
|
+
|
22
|
+
@tcp_port = opts.delete(:tcp_port) || (@base_port + @id * 2)
|
23
|
+
@http_port = opts.delete(:http_port) || (@base_port + 1 + @id * 2)
|
19
24
|
@lookupd = opts.delete(:nsqlookupd) || []
|
20
25
|
@broadcast_address = opts.delete(:broadcast_address) || @host
|
21
26
|
|
@@ -4,15 +4,20 @@ require_relative 'http_wrapper'
|
|
4
4
|
class Nsqlookupd < ProcessWrapper
|
5
5
|
include HTTPWrapper
|
6
6
|
|
7
|
-
attr_reader :host, :tcp_port, :http_port
|
7
|
+
attr_reader :host, :tcp_port, :http_port, :base_port
|
8
8
|
|
9
9
|
def initialize(opts = {}, verbose = false)
|
10
10
|
super
|
11
11
|
|
12
12
|
@id = opts.delete(:id) || 0
|
13
13
|
@host = opts.delete(:host) || '127.0.0.1'
|
14
|
-
|
15
|
-
|
14
|
+
|
15
|
+
# Use a non-standard nsqlookupd port by default so as to not conflict with
|
16
|
+
# any local instances. This is helpful when running tests!
|
17
|
+
@base_port = opts.delete(:base_port) || 4360
|
18
|
+
|
19
|
+
@tcp_port = opts.delete(:tcp_port) || (@base_port + @id * 2)
|
20
|
+
@http_port = opts.delete(:http_port) || (@base_port + 1 + @id * 2)
|
16
21
|
@broadcast_address = opts.delete(:broadcast_address) || @host
|
17
22
|
|
18
23
|
@extra_args = opts.map do |key, value|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nsq-cluster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wistia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sys-proctable
|