fluent-plugin-sqs 0.2.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION +1 -1
  3. metadata +40 -34
  4. data/lib/fluent/plugin/in_sqs.rb +0 -64
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ begin
9
9
  gemspec.summary = "Amazon SQS output plugin for Fluent event collector"
10
10
  gemspec.author = "Yudai Odagiri"
11
11
  gemspec.email = "ixixizko@gmail.com"
12
- gemspec.homepage = "http://github.com/fluent"
12
+ gemspec.homepage = "https://github.com/ixixi/fluent-plugin-sqs"
13
13
  gemspec.has_rdoc = false
14
14
  gemspec.require_paths = ["lib"]
15
15
  gemspec.add_dependency "fluentd", "~> 0.10.0"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.3
metadata CHANGED
@@ -1,73 +1,79 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-sqs
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.1
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.2.3
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Yudai Odagiri
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-02 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2013-06-15 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
15
16
  name: fluentd
16
- requirement: &70291989308420 !ruby/object:Gem::Requirement
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
17
19
  none: false
18
- requirements:
20
+ requirements:
19
21
  - - ~>
20
- - !ruby/object:Gem::Version
22
+ - !ruby/object:Gem::Version
21
23
  version: 0.10.0
22
24
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70291989308420
25
- - !ruby/object:Gem::Dependency
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
26
27
  name: aws-sdk
27
- requirement: &70291989307460 !ruby/object:Gem::Requirement
28
+ prerelease: false
29
+ requirement: &id002 !ruby/object:Gem::Requirement
28
30
  none: false
29
- requirements:
31
+ requirements:
30
32
  - - ~>
31
- - !ruby/object:Gem::Version
33
+ - !ruby/object:Gem::Version
32
34
  version: 1.3.2
33
35
  type: :runtime
34
- prerelease: false
35
- version_requirements: *70291989307460
36
+ version_requirements: *id002
36
37
  description:
37
38
  email: ixixizko@gmail.com
38
39
  executables: []
40
+
39
41
  extensions: []
40
- extra_rdoc_files:
42
+
43
+ extra_rdoc_files:
41
44
  - README.rdoc
42
- files:
45
+ files:
43
46
  - AUTHORS
44
47
  - Rakefile
45
48
  - VERSION
46
- - lib/fluent/plugin/in_sqs.rb
47
49
  - lib/fluent/plugin/out_sqs.rb
48
50
  - README.rdoc
49
- homepage: http://github.com/fluent
51
+ homepage: https://github.com/ixixi/fluent-plugin-sqs
50
52
  licenses: []
53
+
51
54
  post_install_message:
52
55
  rdoc_options: []
53
- require_paths:
56
+
57
+ require_paths:
54
58
  - lib
55
- required_ruby_version: !ruby/object:Gem::Requirement
59
+ required_ruby_version: !ruby/object:Gem::Requirement
56
60
  none: false
57
- requirements:
58
- - - ! '>='
59
- - !ruby/object:Gem::Version
60
- version: '0'
61
- required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: "0"
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
66
  none: false
63
- requirements:
64
- - - ! '>='
65
- - !ruby/object:Gem::Version
66
- version: '0'
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: "0"
67
71
  requirements: []
72
+
68
73
  rubyforge_project:
69
- rubygems_version: 1.8.7
74
+ rubygems_version: 1.8.23
70
75
  signing_key:
71
76
  specification_version: 3
72
77
  summary: Amazon SQS output plugin for Fluent event collector
73
78
  test_files: []
79
+
@@ -1,64 +0,0 @@
1
- module Fluent
2
-
3
- require 'aws-sdk'
4
-
5
- class SQSOutput < BufferedOutput
6
-
7
- Fluent::Plugin.register_output('sqs', self)
8
-
9
- include SetTagKeyMixin
10
- config_set_default :include_tag_key, false
11
-
12
- include SetTimeKeyMixin
13
- config_set_default :include_time_key, true
14
-
15
- config_param :aws_key_id, :string
16
- config_param :aws_sec_key, :string
17
- config_param :queue_name, :string
18
- config_param :sqs_endpoint, :string, :default => 'sqs.ap-northeast-1.amazonaws.com'
19
- config_param :delay_seconds, :integer, :default => 0
20
- #config_param :buffer_queue_limit, :integer, :default => 10
21
-
22
- def configure(conf)
23
- super
24
- end
25
-
26
- def start
27
- super
28
-
29
- AWS.config(
30
- :access_key_id => @aws_key_id,
31
- :secret_access_key => @aws_sec_key,
32
- :sqs_endpoint => @sqs_endpoint )
33
-
34
- @sqs = AWS::SQS.new
35
- @queue = @sqs.queues.create(@queue_name)
36
-
37
- loop do
38
- records = [{ :message_body => "abcdefg"},{ :message_body => "12345"}]
39
- @queue.batch_send(records)
40
- end
41
-
42
- end
43
-
44
- def shutdown
45
- super
46
- end
47
-
48
- def format(tag, time, record)
49
- record.to_msgpack
50
- end
51
-
52
- def write(chunk)
53
- records = []
54
- chunk.msgpack_each {|record| records << { :message_body => record.to_json, :delay_seconds => @delay_seconds } }
55
- until records.length <= 0 do
56
- begin
57
- @queue.batch_send(records.slice!(0..9))
58
- rescue => e
59
- $stderr.puts e
60
- end
61
- end
62
- end
63
- end
64
- end