sk-fluent-plugin-azureeventhubs 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +64 -70
- data/README.md +5 -2
- data/aync-fluent-plugin-azureeventhubs.gemspec +3 -2
- data/lib/fluent/plugin/azureeventhubs/http.rb +5 -10
- data/lib/fluent/plugin/out_azureeventhubs_buffered.rb +7 -14
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85a00ac83b49d7743d94895ea9f48d60f7ecef05256582bc7a6b4c11d651ba52
|
4
|
+
data.tar.gz: 48689fc27b9ee1e4bdd1619499d998cba0e9351ca7f1e9bee578862b0e4b0d6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90597588f4daf26af544c0f17f050b7702e1158cc09fd28ba47ac0d14bc4e213e7bfae5623a8d4b73a16e826e5f24b06aea7a7bec5fb870ec54994618331eafe
|
7
|
+
data.tar.gz: 9a988280ee06a4cc2b690d1c617644c7ed7708ded296979ccb6da68265e73eef02af04045e4b4ff40456995d5a8d32655d8229f798df3923f96f2c92074269b4
|
data/Gemfile.lock
CHANGED
@@ -1,70 +1,64 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
sk-fluent-plugin-azureeventhubs (0.0.
|
5
|
-
fluentd (>= 0.10.58, < 2)
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
tzinfo (~> 1.0)
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
tzinfo (1.
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
bundler (~> 1.7)
|
66
|
-
rake (~> 10.0)
|
67
|
-
sk-fluent-plugin-azureeventhubs!
|
68
|
-
|
69
|
-
BUNDLED WITH
|
70
|
-
1.17.1
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sk-fluent-plugin-azureeventhubs (0.0.19)
|
5
|
+
fluentd (>= 0.10.58, < 2)
|
6
|
+
json (>= 2.1.0)
|
7
|
+
rest-client (>= 2.0.2)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
cool.io (1.5.3)
|
13
|
+
dig_rb (1.0.1)
|
14
|
+
domain_name (0.5.20180417)
|
15
|
+
unf (>= 0.0.5, < 1.0.0)
|
16
|
+
fluentd (1.2.6)
|
17
|
+
cool.io (>= 1.4.5, < 2.0.0)
|
18
|
+
dig_rb (~> 1.0.0)
|
19
|
+
http_parser.rb (>= 0.5.1, < 0.7.0)
|
20
|
+
msgpack (>= 0.7.0, < 2.0.0)
|
21
|
+
serverengine (>= 2.0.4, < 3.0.0)
|
22
|
+
sigdump (~> 0.2.2)
|
23
|
+
strptime (>= 0.2.2, < 1.0.0)
|
24
|
+
tzinfo (~> 1.0)
|
25
|
+
tzinfo-data (~> 1.0)
|
26
|
+
yajl-ruby (~> 1.0)
|
27
|
+
http-cookie (1.0.3)
|
28
|
+
domain_name (~> 0.5)
|
29
|
+
http_parser.rb (0.6.0)
|
30
|
+
json (2.1.0)
|
31
|
+
mime-types (3.2.2)
|
32
|
+
mime-types-data (~> 3.2015)
|
33
|
+
mime-types-data (3.2018.0812)
|
34
|
+
msgpack (1.2.4)
|
35
|
+
netrc (0.11.0)
|
36
|
+
rake (10.5.0)
|
37
|
+
rest-client (2.0.2)
|
38
|
+
http-cookie (>= 1.0.2, < 2.0)
|
39
|
+
mime-types (>= 1.16, < 4.0)
|
40
|
+
netrc (~> 0.8)
|
41
|
+
serverengine (2.0.7)
|
42
|
+
sigdump (~> 0.2.2)
|
43
|
+
sigdump (0.2.4)
|
44
|
+
strptime (0.2.3)
|
45
|
+
thread_safe (0.3.6)
|
46
|
+
tzinfo (1.2.5)
|
47
|
+
thread_safe (~> 0.1)
|
48
|
+
tzinfo-data (1.2018.7)
|
49
|
+
tzinfo (>= 1.0.0)
|
50
|
+
unf (0.1.4)
|
51
|
+
unf_ext
|
52
|
+
unf_ext (0.0.7.5)
|
53
|
+
yajl-ruby (1.4.1)
|
54
|
+
|
55
|
+
PLATFORMS
|
56
|
+
ruby
|
57
|
+
|
58
|
+
DEPENDENCIES
|
59
|
+
bundler (~> 1.7)
|
60
|
+
rake (~> 10.0)
|
61
|
+
sk-fluent-plugin-azureeventhubs!
|
62
|
+
|
63
|
+
BUNDLED WITH
|
64
|
+
1.17.1
|
data/README.md
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
# async-fluent-plugin-azureeventhubs
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.com/sio2k/async-fluent-plugin-azureeventhubs
|
3
|
+
[![Build Status](https://travis-ci.com/sio2k/async-fluent-plugin-azureeventhubs.svg?branch=master)](https://travis-ci.com/sio2k/async-fluent-plugin-azureeventhubs)
|
4
4
|
[![Known Vulnerabilities](https://snyk.io/test/github/sio2k/async-fluent-plugin-azureeventhubs/badge.svg?targetFile=Gemfile.lock)](https://snyk.io/test/github/sio2k/async-fluent-plugin-azureeventhubs?targetFile=Gemfile.lock)
|
5
|
+
[![CodeFactor](https://www.codefactor.io/repository/github/sio2k/async-fluent-plugin-azureeventhubs/badge)](https://www.codefactor.io/repository/github/sio2k/async-fluent-plugin-azureeventhubs)
|
6
|
+
[![BCH compliance](https://bettercodehub.com/edge/badge/sio2k/async-fluent-plugin-azureeventhubs?branch=master)](https://bettercodehub.com/)
|
5
7
|
[![Gem Downloads](https://img.shields.io/gem/dt/sk-fluent-plugin-azureeventhubs.svg)](https://rubygems.org/gems/sk-fluent-plugin-azureeventhubs)
|
6
8
|
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/sio2k/async-fluent-plugin-azureeventhubs-/blob/master/LICENSE)
|
7
9
|
Inspired by https://github.com/htgc/fluent-plugin-azureeventhubs
|
8
10
|
|
9
11
|
- Snyk integration done
|
10
12
|
- Travis build done
|
11
|
-
- Buffered output
|
13
|
+
- Buffered output done
|
14
|
+
- revist rest client pending
|
@@ -15,11 +15,12 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
16
16
|
spec.require_paths = ["lib"]
|
17
17
|
spec.name = "sk-fluent-plugin-azureeventhubs"
|
18
|
-
spec.version = "0.0.
|
18
|
+
spec.version = "0.0.19"
|
19
19
|
spec.required_ruby_version = ">= 2.1.0"
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.7"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
23
|
spec.add_dependency "fluentd", [">= 0.10.58", "< 2"]
|
24
|
-
spec.add_dependency "
|
24
|
+
spec.add_dependency "rest-client", [">= 2.0.2"]
|
25
|
+
spec.add_dependency "json", [">= 2.1.0"]
|
25
26
|
end
|
@@ -3,7 +3,7 @@ class AzureEventHubsHttpSender
|
|
3
3
|
def initialize(connection_string, hub_name, expiry=3600,proxy_addr='',proxy_port=3128,open_timeout=60,read_timeout=60)
|
4
4
|
require 'openssl'
|
5
5
|
require 'base64'
|
6
|
-
require '
|
6
|
+
require 'rest-client'
|
7
7
|
require 'json'
|
8
8
|
require 'cgi'
|
9
9
|
require 'time'
|
@@ -41,21 +41,16 @@ class AzureEventHubsHttpSender
|
|
41
41
|
return token
|
42
42
|
end
|
43
43
|
|
44
|
-
private :generate_sas_token
|
45
44
|
|
46
45
|
def send(payload)
|
47
46
|
send_w_properties(payload, nil)
|
48
47
|
end
|
49
48
|
|
50
49
|
def send_w_properties(payload, properties)
|
51
|
-
token = generate_sas_token(@uri.to_s)
|
52
|
-
|
53
|
-
|
50
|
+
token = generate_sas_token(@uri.to_s)
|
51
|
+
RestClient.post("#{@uri.to_s}?timeout=10&api-version=2014-01", payload.to_json,
|
52
|
+
{ 'Content-Type' => 'application/atom+xml;type=entry;charset=utf-8',
|
54
53
|
'Authorization' => token
|
55
|
-
}
|
56
|
-
parameters: payload.to_s {|response| response.code }
|
57
|
-
rescue Exception => e
|
58
|
-
log.warn "Send exception occurred: #{e}"
|
59
|
-
raise e
|
54
|
+
})
|
60
55
|
end
|
61
56
|
end
|
@@ -45,14 +45,8 @@ module Fluent::Plugin
|
|
45
45
|
def configure(conf)
|
46
46
|
compat_parameters_convert(conf, :buffer, :inject)
|
47
47
|
super
|
48
|
-
case @type
|
49
|
-
when 'amqps'
|
50
|
-
raise NotImplementedError
|
51
|
-
else
|
52
48
|
require_relative 'azureeventhubs/http'
|
53
49
|
@sender = AzureEventHubsHttpSender.new(@connection_string, @hub_name, @expiry_interval,@proxy_addr,@proxy_port,@open_timeout,@read_timeout)
|
54
|
-
end
|
55
|
-
# raise Fluent::ConfigError, "'tag' in chunk_keys is required." if not @chunk_key_tag
|
56
50
|
end
|
57
51
|
|
58
52
|
def format(tag, time, record)
|
@@ -64,16 +58,15 @@ module Fluent::Plugin
|
|
64
58
|
true
|
65
59
|
end
|
66
60
|
|
61
|
+
def multi_workers_ready?
|
62
|
+
true
|
63
|
+
end
|
64
|
+
|
67
65
|
def write(chunk)
|
68
66
|
chunk.msgpack_each { |tag, time, record|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
end
|
73
|
-
if @include_time
|
74
|
-
record[@tag_time_name] = time
|
75
|
-
end
|
76
|
-
@sender.send_w_properties(record, @message_properties)
|
67
|
+
records = []
|
68
|
+
records.push(record)
|
69
|
+
@sender.send_w_properties(records, @message_properties)
|
77
70
|
}
|
78
71
|
end
|
79
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sk-fluent-plugin-azureeventhubs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandeep Kotha
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -59,19 +59,33 @@ dependencies:
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '2'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: rest-client
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
67
|
+
version: 2.0.2
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
74
|
+
version: 2.0.2
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: json
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 2.1.0
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 2.1.0
|
75
89
|
description: Fluentd output plugin for Azure Event Hubs
|
76
90
|
email:
|
77
91
|
- sandeep.kotha@live.com
|