fluent-plugin-amazon_sns 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +4 -0
- data/README.md +7 -0
- data/fluent-plugin-amazon_sns.gemspec +1 -1
- data/lib/fluent/plugin/amazon_sns/version.rb +1 -1
- data/lib/fluent/plugin/out_amazon_sns.rb +21 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce1734dce837b836687d6650c00dbd52fcbf684a1702f8b307e59c96f966f2b0
|
4
|
+
data.tar.gz: 53ed49454510ff9927539cc938dcc42504c62c45c7003cf5760e858c6dc8a509
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ee9a7aad646dcffa86bd4eb576c8145b884db5e231bf0d4a07bc09af91fae5a86f0ac7b91c8546d509699b79d77e0e8cbd9622d3a7f7a17b6968fd1e877456f
|
7
|
+
data.tar.gz: 7f7d2c6a4a09b5220aa9f9ce275b41f791098e41df62caca0aa370dad590213ccef79980a0ce52cf2e22e19f1950048ea7eab101867bfce0a033d7064c6994c0
|
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
Fluent output plugin to send messages to Amazon SNS.
|
4
4
|
|
5
|
+
## Requirements
|
6
|
+
|
7
|
+
| fluent-plugin-amazon_sns | Fluentd | Ruby |
|
8
|
+
|--------------------------|------------ |--------|
|
9
|
+
| >= 0.1.0 | >= v0.14.15 | >= 2.1 |
|
10
|
+
| < 0.1.0 | >= v0.10.0 | >= 1.9 |
|
11
|
+
|
5
12
|
## Installation
|
6
13
|
|
7
14
|
gem install fluent-plugin-amazon_sns
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "fluentd", [">= 0.
|
21
|
+
spec.add_dependency "fluentd", [">= 0.14.15", "< 2"]
|
22
22
|
spec.add_dependency "aws-sdk-sns", "~> 1"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.5"
|
@@ -1,13 +1,15 @@
|
|
1
1
|
require "aws-sdk-sns"
|
2
|
+
require "fluent/plugin/output"
|
2
3
|
|
3
|
-
module Fluent
|
4
|
-
class AmazonSNSOutput <
|
4
|
+
module Fluent::Plugin
|
5
|
+
class AmazonSNSOutput < Output
|
5
6
|
Fluent::Plugin.register_output('amazon_sns', self)
|
6
7
|
|
7
|
-
|
8
|
-
|
8
|
+
helpers :compat_parameters, :inject
|
9
|
+
|
10
|
+
DEFAULT_BUFFER_TYPE = "memory"
|
9
11
|
|
10
|
-
|
12
|
+
config_set_default :include_tag_key, false
|
11
13
|
config_set_default :include_time_key, true
|
12
14
|
|
13
15
|
config_param :aws_access_key_id, :string, default: nil
|
@@ -23,7 +25,12 @@ module Fluent
|
|
23
25
|
config_param :remove_tag_prefix, :string, default: nil
|
24
26
|
config_param :topic_map_key, :string, default: nil
|
25
27
|
|
28
|
+
config_section :buffer do
|
29
|
+
config_set_default :@type, DEFAULT_BUFFER_TYPE
|
30
|
+
end
|
31
|
+
|
26
32
|
def configure(conf)
|
33
|
+
compat_parameters_convert(conf, :buffer, :inject)
|
27
34
|
super
|
28
35
|
|
29
36
|
@topic_generator = case
|
@@ -57,9 +64,18 @@ module Fluent
|
|
57
64
|
end
|
58
65
|
|
59
66
|
def format(tag, time, record)
|
67
|
+
record = inject_values_to_record(tag, time, record)
|
60
68
|
[tag, time, record].to_msgpack
|
61
69
|
end
|
62
70
|
|
71
|
+
def formatted_to_msgpack_binary?
|
72
|
+
true
|
73
|
+
end
|
74
|
+
|
75
|
+
def multi_workers_ready?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
63
79
|
def write(chunk)
|
64
80
|
chunk.msgpack_each do |tag, time, record|
|
65
81
|
record["time"] = Time.at(time).localtime
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-amazon_sns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tatsuhiko Miyagawa
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.14.15
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '2'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 0.14.15
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2'
|