fluent-plugin-dynamodb-alt 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -5
- data/fluent-plugin-dynamodb-alt.gemspec +1 -1
- data/lib/fluent/plugin/out_dynamodb_alt.rb +2 -0
- data/spec/out_dynamodb_alt_spec.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 313cdebb4acdd110160053ae3e62fae21df1f82e
|
4
|
+
data.tar.gz: 42001e619859094c6e118e511310c71edb47b8ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b5f25c37dd794f4f7500b55d4c6c3ad2b3f7e6712c90002129d84657381694924d7db4e8900aa9607fd0cf7a80ec2a0f21407cf893ed924a712b7702079e080
|
7
|
+
data.tar.gz: 863bb9e03764a4cab2d66629881c701b10be1bd2a07a70e52e8a94af18a1a28fd4db4803a667dfb89856e5435cbb1fee1e48a98a67d36e406400d326caa5e795
|
data/README.md
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
Alternative fluent plugin to output to DynamoDB.
|
4
4
|
|
5
|
+
[](http://badge.fury.io/rb/fluent-plugin-dynamodb-alt)
|
6
|
+
[](https://travis-ci.org/winebarrel/fluent-plugin-dynamodb-alt)
|
7
|
+
|
5
8
|
## Features
|
6
9
|
|
7
|
-
* Use [PutItem](http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html)
|
10
|
+
* Use [PutItem](http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html) Action.
|
8
11
|
* Sort the records in the timestamp key.
|
9
12
|
* Aggregate the records in the primary key.
|
10
|
-
* Support [Expected constraint](http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-Expected)
|
11
|
-
|
12
|
-
[](http://badge.fury.io/rb/fluent-plugin-dynamodb-alt)
|
13
|
-
[](https://travis-ci.org/winebarrel/fluent-plugin-dynamodb-alt)
|
13
|
+
* Support [Expected constraint](http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-Expected).
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
@@ -29,6 +29,7 @@ bundle exec rake install
|
|
29
29
|
region ap-northeast-1
|
30
30
|
table_name my_table
|
31
31
|
timestamp_key timestamp
|
32
|
+
#endpoint http:://localhost:4567
|
32
33
|
#concurrency 1
|
33
34
|
|
34
35
|
# see http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html#DDB-PutItem-request-Expected
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'fluent-plugin-dynamodb-alt'
|
7
|
-
spec.version = '0.1.
|
7
|
+
spec.version = '0.1.1'
|
8
8
|
spec.authors = ['Genki Sugawara']
|
9
9
|
spec.email = ['sgwr_dts@yahoo.co.jp']
|
10
10
|
spec.summary = %q{Fluent plugin to output to DynamoDB.}
|
@@ -13,6 +13,7 @@ class Fluent::DynamodbAltOutput < Fluent::BufferedOutput
|
|
13
13
|
config_param :aws_key_id, :string, :default => nil
|
14
14
|
config_param :aws_sec_key, :string, :default => nil
|
15
15
|
config_param :region, :string, :default => nil
|
16
|
+
config_param :endpoint, :string, :default => nil
|
16
17
|
config_param :table_name, :string
|
17
18
|
config_param :timestamp_key, :string
|
18
19
|
config_param :concurrency, :integer, :default => 1
|
@@ -43,6 +44,7 @@ class Fluent::DynamodbAltOutput < Fluent::BufferedOutput
|
|
43
44
|
aws_opts[:access_key_id] = @aws_key_id if @aws_key_id
|
44
45
|
aws_opts[:secret_access_key] = @aws_sec_key if @aws_sec_key
|
45
46
|
aws_opts[:region] = @region if @region
|
47
|
+
aws_opts[:endpoint] = @endpoint if @endpoint
|
46
48
|
|
47
49
|
configure_aws(aws_opts)
|
48
50
|
|
@@ -9,7 +9,8 @@ describe Fluent::DynamodbAltOutput do
|
|
9
9
|
expect(driver.instance).to receive(:configure_aws).with(
|
10
10
|
:access_key_id => "AKIAIOSFODNN7EXAMPLE",
|
11
11
|
:secret_access_key => "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
|
12
|
-
:region => "ap-northeast-1"
|
12
|
+
:region => "ap-northeast-1",
|
13
|
+
:endpoint => "http:://localhost:4567")
|
13
14
|
|
14
15
|
expect(driver.instance).to receive(:create_client) {
|
15
16
|
client = double('client')
|
@@ -28,6 +29,7 @@ describe Fluent::DynamodbAltOutput do
|
|
28
29
|
aws_key_id AKIAIOSFODNN7EXAMPLE
|
29
30
|
aws_sec_key wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
30
31
|
region ap-northeast-1
|
32
|
+
endpoint http:://localhost:4567
|
31
33
|
table_name my_table
|
32
34
|
timestamp_key timestamp
|
33
35
|
concurrency 2
|
@@ -36,6 +38,8 @@ describe Fluent::DynamodbAltOutput do
|
|
36
38
|
|
37
39
|
expect(driver.instance.aws_key_id ).to eq 'AKIAIOSFODNN7EXAMPLE'
|
38
40
|
expect(driver.instance.aws_sec_key ).to eq 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
|
41
|
+
expect(driver.instance.region ).to eq 'ap-northeast-1'
|
42
|
+
expect(driver.instance.endpoint ).to eq 'http:://localhost:4567'
|
39
43
|
expect(driver.instance.table_name ).to eq 'my_table'
|
40
44
|
expect(driver.instance.timestamp_key ).to eq 'timestamp'
|
41
45
|
expect(driver.instance.concurrency ).to eq 2
|