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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1759199fe6aee4f96ccb14048c4ce68a2d14bbaf8aa4a9700f0817db3f178d5a
4
- data.tar.gz: 539e2a461c2eaa6d35e1a518f760db8c5642b0e4158e962770a5f1b778887ce5
3
+ metadata.gz: ce1734dce837b836687d6650c00dbd52fcbf684a1702f8b307e59c96f966f2b0
4
+ data.tar.gz: 53ed49454510ff9927539cc938dcc42504c62c45c7003cf5760e858c6dc8a509
5
5
  SHA512:
6
- metadata.gz: 3d1a2c1a2f31569e2b715ce4b243b615e2f24ce248333f5b0dc293e2396b8ef2016df3efb45c6ea2eb2ff3b1c084b6ff48429616dc96eab565bdd00190008854
7
- data.tar.gz: 702f2c0146cf5cbbf4dc8684d4c2b2a0c2bb767177f571b48f639be97ac53d1dea4db3c8a66978a6f9240a659b09c5d9d7c8aeeed789e228ef049ec321fb4a5b
6
+ metadata.gz: 0ee9a7aad646dcffa86bd4eb576c8145b884db5e231bf0d4a07bc09af91fae5a86f0ac7b91c8546d509699b79d77e0e8cbd9622d3a7f7a17b6968fd1e877456f
7
+ data.tar.gz: 7f7d2c6a4a09b5220aa9f9ce275b41f791098e41df62caca0aa370dad590213ccef79980a0ce52cf2e22e19f1950048ea7eab101867bfce0a033d7064c6994c0
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.1.0
2
+
3
+ - Migrate to v0.14 API (cosmo0920)
4
+
1
5
  ### 0.0.8
2
6
 
3
7
  - Relax fluentd dependency (kaorimatz)
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.10", "< 2"]
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,7 +1,7 @@
1
1
  module Fluent
2
2
  module Plugin
3
3
  module AmazonSns
4
- VERSION = "0.0.8"
4
+ VERSION = "0.1.0"
5
5
  end
6
6
  end
7
7
  end
@@ -1,13 +1,15 @@
1
1
  require "aws-sdk-sns"
2
+ require "fluent/plugin/output"
2
3
 
3
- module Fluent
4
- class AmazonSNSOutput < BufferedOutput
4
+ module Fluent::Plugin
5
+ class AmazonSNSOutput < Output
5
6
  Fluent::Plugin.register_output('amazon_sns', self)
6
7
 
7
- include SetTagKeyMixin
8
- config_set_default :include_tag_key, false
8
+ helpers :compat_parameters, :inject
9
+
10
+ DEFAULT_BUFFER_TYPE = "memory"
9
11
 
10
- include SetTimeKeyMixin
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.8
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: '0.10'
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: '0.10'
29
+ version: 0.14.15
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2'