fluent-plugin-kinesis 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/fluent-plugin-kinesis.gemspec +2 -0
- data/lib/fluent/plugin/kinesis_helper/credentials.rb +17 -17
- data/lib/fluent_plugin_kinesis/version.rb +1 -1
- data/lib/kinesis_producer/daemon.rb +4 -4
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46273afe8f8e8fa0f70931b1f2bbf1893df30256
|
4
|
+
data.tar.gz: 55beac91c0b19714355e901ed256dbf16210a930
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57f4784a5c00763fb358de48d74d161815a90a466f4e8afe895b91485bae1db6a6eba84b994def1ddf6a90f9a60742ac63b4abd91d1fa9eda16d360bb5c0db02
|
7
|
+
data.tar.gz: a5b6e7769c7ddce92bd9ee27e603c7bfbe41ac3a53d032b12b5edf30522a1eb98f70e54a75dee6ec33dd8a197f8af8effd3d373a0c98c9bb709e67ecd0d947a0
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -431,7 +431,7 @@ Verify the endpoint's certificate. Do not disable unless using [**custom_endpoin
|
|
431
431
|
Default: `true`
|
432
432
|
|
433
433
|
#### credentials_refresh_delay
|
434
|
-
Interval
|
434
|
+
Interval milliseconds for refreshing credentials seding to KPL.
|
435
435
|
|
436
436
|
Defalut 5000
|
437
437
|
|
@@ -49,4 +49,6 @@ Gem::Specification.new do |spec|
|
|
49
49
|
spec.add_development_dependency "dummer", ">= 0.4.0"
|
50
50
|
spec.add_development_dependency "rubyzip", ">= 1.0.0"
|
51
51
|
spec.add_development_dependency "mocha", ">= 1.1.0"
|
52
|
+
spec.add_development_dependency "webmock", ">= 1.24.2"
|
53
|
+
spec.add_development_dependency "fakefs", ">= 0.8.1"
|
52
54
|
end
|
@@ -16,23 +16,23 @@ module Fluent
|
|
16
16
|
module KinesisHelper
|
17
17
|
module Credentials
|
18
18
|
def credentials
|
19
|
-
case
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
)
|
28
|
-
when @shared_credentials
|
29
|
-
Aws::SharedCredentials.new(
|
30
|
-
profile_name: @shared_credentials.profile_name,
|
31
|
-
path: @shared_credentials.path,
|
19
|
+
@provider ||= case
|
20
|
+
when @assume_role_credentials
|
21
|
+
Aws::AssumeRoleCredentials.new(
|
22
|
+
client: Aws::STS::Client.new(region: @region),
|
23
|
+
role_arn: @assume_role_credentials.role_arn,
|
24
|
+
external_id: @assume_role_credentials.external_id,
|
25
|
+
role_session_name: 'aws-fluent-plugin-kinesis',
|
26
|
+
duration_seconds: 60 * 60,
|
32
27
|
)
|
33
|
-
|
34
|
-
|
35
|
-
|
28
|
+
when @shared_credentials
|
29
|
+
Aws::SharedCredentials.new(
|
30
|
+
profile_name: @shared_credentials.profile_name,
|
31
|
+
path: @shared_credentials.path,
|
32
|
+
)
|
33
|
+
else
|
34
|
+
default_credentials_provider
|
35
|
+
end
|
36
36
|
end
|
37
37
|
|
38
38
|
private
|
@@ -44,7 +44,7 @@ module Fluent
|
|
44
44
|
if provider.nil?
|
45
45
|
raise Fluent::ConfigError, "You must specify credentials on ~/.aws/credentials, environment variables or IAM role for default credentials"
|
46
46
|
end
|
47
|
-
provider
|
47
|
+
provider
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -158,7 +158,7 @@ module KinesisProducer
|
|
158
158
|
def update_credentials
|
159
159
|
add(make_set_credentials_message)
|
160
160
|
add(make_set_metrics_credentials_message) if @metrics_credentials
|
161
|
-
sleep
|
161
|
+
sleep(@credentials_refresh_delay.to_f/1000)
|
162
162
|
end
|
163
163
|
|
164
164
|
def make_configuration_message
|
@@ -183,9 +183,9 @@ module KinesisProducer
|
|
183
183
|
def make_set_credential_message(credentials, for_metrics = false)
|
184
184
|
return nil if credentials.nil?
|
185
185
|
cred = KinesisProducer::Protobuf::Credentials.new(
|
186
|
-
akid: credentials.access_key_id,
|
187
|
-
secret_key: credentials.secret_access_key,
|
188
|
-
token: credentials.session_token
|
186
|
+
akid: credentials.credentials.access_key_id,
|
187
|
+
secret_key: credentials.credentials.secret_access_key,
|
188
|
+
token: credentials.credentials.session_token
|
189
189
|
)
|
190
190
|
set_credentials = KinesisProducer::Protobuf::SetCredentials.new(credentials: cred, for_metrics: for_metrics)
|
191
191
|
make_message(FixnumMax, :set_credentials, set_credentials)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-kinesis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -240,6 +240,34 @@ dependencies:
|
|
240
240
|
- - ">="
|
241
241
|
- !ruby/object:Gem::Version
|
242
242
|
version: 1.1.0
|
243
|
+
- !ruby/object:Gem::Dependency
|
244
|
+
name: webmock
|
245
|
+
requirement: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - ">="
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: 1.24.2
|
250
|
+
type: :development
|
251
|
+
prerelease: false
|
252
|
+
version_requirements: !ruby/object:Gem::Requirement
|
253
|
+
requirements:
|
254
|
+
- - ">="
|
255
|
+
- !ruby/object:Gem::Version
|
256
|
+
version: 1.24.2
|
257
|
+
- !ruby/object:Gem::Dependency
|
258
|
+
name: fakefs
|
259
|
+
requirement: !ruby/object:Gem::Requirement
|
260
|
+
requirements:
|
261
|
+
- - ">="
|
262
|
+
- !ruby/object:Gem::Version
|
263
|
+
version: 0.8.1
|
264
|
+
type: :development
|
265
|
+
prerelease: false
|
266
|
+
version_requirements: !ruby/object:Gem::Requirement
|
267
|
+
requirements:
|
268
|
+
- - ">="
|
269
|
+
- !ruby/object:Gem::Version
|
270
|
+
version: 0.8.1
|
243
271
|
description:
|
244
272
|
email:
|
245
273
|
executables: []
|