fluent-plugin-nsq 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/fluent/plugin/out_nsq.rb +6 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2FiMjIzZjY5MjQwNTcyMjM1YWU3NWEwMzUwNWIwMDQzMTU1Y2I3ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTZkNDBmYWIwYjNlMjQwYmI1OThlMDA0OTAzYjA1Y2EzYzY0MTYxNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWE1MjkyM2FmZTFiMTViNjMxZGE2NTlhYjg3OWM3MjUyOTJiOGY3NTI4YWE0
|
10
|
+
ODVhNDNmY2E2MGY0NDA4ZTMyN2M0MmNkZTMwMTc4ZGFmZjc0YzliYzY4NzFi
|
11
|
+
NGFhZDgyOWU0ZmRkNDI5MzY0NmU0ZGJhOGEyNGE0NzU3NWY5YTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2IyMjc5ZmU3OGJjOWQ3NWVhMWQ4NDgzNzRjOTdmYjgwMmJhNWI2MTMxMGM5
|
14
|
+
Yzk5YmJlODk1YTZhODcwNWY2MDUwZDY2YTExODBkMmEyZDQyMmFhMGQ5NWZh
|
15
|
+
NTk5NTQzYjc1MWVlNjAxY2I5YzI5ZDc1ZjE4MmU3MjZmZmRhMzE=
|
@@ -15,19 +15,21 @@ module Fluent
|
|
15
15
|
def configure(conf)
|
16
16
|
super
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
fail ConfigError, 'Missing nsqlookupd' unless @nsqlookupd
|
19
|
+
fail ConfigError, 'Missing topic' unless @topic
|
20
20
|
end
|
21
21
|
|
22
22
|
def start
|
23
|
+
super
|
23
24
|
lookupds = @nsqlookupd.split(',')
|
24
25
|
@producer = Nsq::Producer.new(
|
25
|
-
|
26
|
+
nsqlookupd: lookupds,
|
26
27
|
topic: @topic
|
27
28
|
)
|
28
29
|
end
|
29
30
|
|
30
31
|
def shutdown
|
32
|
+
super
|
31
33
|
@producer.terminate
|
32
34
|
end
|
33
35
|
|
@@ -40,7 +42,7 @@ module Fluent
|
|
40
42
|
|
41
43
|
chunk.msgpack_each do |tag, time, record|
|
42
44
|
next unless record.is_a? Hash
|
43
|
-
#TODO get rid of this extra copy
|
45
|
+
# TODO get rid of this extra copy
|
44
46
|
tagged_record = record.merge(
|
45
47
|
_key: tag,
|
46
48
|
_ts: time
|