logstash-output-websocket_topics 2.1.4 → 2.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/outputs/{websocket.rb → websocket_topics.rb} +6 -7
- data/lib/logstash/outputs/{websocket → websocket_topics}/app.rb +1 -1
- data/lib/logstash/outputs/{websocket → websocket_topics}/pubsub.rb +1 -1
- data/logstash-output-websocket_topics.gemspec +1 -1
- data/spec/outputs/websocket_spec.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ede515b6cf46318db0cecd6218fb6f12b36fc130
|
4
|
+
data.tar.gz: c986d2ca27dbc177220de090c0cabb453061590a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bde5bb942d484ad1f87d2b12f516349e7e4132e9d6574ef42255207824e346acfe9b7f7d7d6fc3a2456cc738ccd1489a75bd44116f137726ca48ae0c9315ba1
|
7
|
+
data.tar.gz: 3a787d35fdad25c3344c1d250b92d748307097b2e2416ea25f8e7849cdae02b6eb3485c641c1d2090e1cdf36befc7d30d809c12be16a38d823ac24ad1a79a543
|
@@ -10,7 +10,7 @@ require "logstash/outputs/base"
|
|
10
10
|
#
|
11
11
|
# If no clients are connected, any messages received are ignored.
|
12
12
|
class LogStash::Outputs::WebSocket < LogStash::Outputs::Base
|
13
|
-
config_name "
|
13
|
+
config_name "websocket_topics"
|
14
14
|
|
15
15
|
# The address to serve websocket data from
|
16
16
|
config :host, :validate => :string, :default => "0.0.0.0"
|
@@ -26,8 +26,8 @@ class LogStash::Outputs::WebSocket < LogStash::Outputs::Base
|
|
26
26
|
public
|
27
27
|
def register
|
28
28
|
require "ftw"
|
29
|
-
require "logstash/outputs/
|
30
|
-
require "logstash/outputs/
|
29
|
+
require "logstash/outputs/websocket_topics/app"
|
30
|
+
require "logstash/outputs/websocket_topics/pubsub"
|
31
31
|
@channels = {}
|
32
32
|
@server = Thread.new(@channels) do |channels|
|
33
33
|
begin
|
@@ -43,14 +43,13 @@ class LogStash::Outputs::WebSocket < LogStash::Outputs::Base
|
|
43
43
|
|
44
44
|
public
|
45
45
|
def receive(event)
|
46
|
-
|
47
|
-
topic = json.topic
|
46
|
+
topic = event.topic
|
48
47
|
if @channels.has_key?(topic)
|
49
|
-
@channels[topic].publish(
|
48
|
+
@channels[topic].publish(event.to_json)
|
50
49
|
else
|
51
50
|
pubsub = make_pubsub(topic)
|
52
51
|
@channels[topic] = pubsub
|
53
|
-
pubsub.publish(
|
52
|
+
pubsub.publish(event.to_json)
|
54
53
|
end # if
|
55
54
|
end # def receive
|
56
55
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-websocket_topics'
|
4
|
-
s.version = '2.1.
|
4
|
+
s.version = '2.1.5'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "This output runs a websocket server and publishes any messages to those conencted clients that have subscribed to the topic being published."
|
7
7
|
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require "logstash/devutils/rspec/spec_helper"
|
3
|
-
require "logstash/outputs/
|
3
|
+
require "logstash/outputs/websocket_topics"
|
4
4
|
|
5
|
-
describe "output/
|
5
|
+
describe "output/websocket_topics" do
|
6
6
|
|
7
7
|
subject(:output) { LogStash::Outputs::WebSocket.new }
|
8
8
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-websocket_topics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Osheroff
|
@@ -98,9 +98,9 @@ files:
|
|
98
98
|
- LICENSE
|
99
99
|
- NOTICE.TXT
|
100
100
|
- README.md
|
101
|
-
- lib/logstash/outputs/
|
102
|
-
- lib/logstash/outputs/
|
103
|
-
- lib/logstash/outputs/
|
101
|
+
- lib/logstash/outputs/websocket_topics.rb
|
102
|
+
- lib/logstash/outputs/websocket_topics/app.rb
|
103
|
+
- lib/logstash/outputs/websocket_topics/pubsub.rb
|
104
104
|
- logstash-output-websocket_topics.gemspec
|
105
105
|
- spec/outputs/websocket_spec.rb
|
106
106
|
homepage: ''
|