fluent-plugin-gcloud-pubsub-custom 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 1c24f666eacd9d35bb07d5eb1aad175fd0c549b3
4
- data.tar.gz: 888acd31eb8ca1f74c689c39b21f915f8b9034ab
3
+ metadata.gz: 8c9f2243c6c609552b125ea53d060467197681fe
4
+ data.tar.gz: 42ebb7ee74c628d14954f1fccc713be595b9a577
5
5
  SHA512:
6
- metadata.gz: f17fc4b9578f08f4181501a0be689db36dcad82b0474b06646f99edc34f1850eb2273efce945ce098a90257cdd9ded87449a93dea5fc0ca5449b30ba3ddc843f
7
- data.tar.gz: 8a937780624f4c02ff5f5d39bc6950a28d8561b1b5494cffb19d0669a713f82f8b7b4cf2789c727ca450d933c9a483275781301aa210d6549e4cb485523505f1
6
+ metadata.gz: af2b11d0ecda25cdc2a6b6db2a0a640277ce0a69c722d0899da60a6306f3fb3c00a3676113942a3c4ef7c3c6c5c77673deea7462fa0ac882e3b95d1cb4a797f2
7
+ data.tar.gz: adc7c0a09c842e96540e1638c36ab3dec913f2cebc4ed73a599df0f4d74e85a94f31f97da99745787649d4555b557859476f1e5e58925bc8513b84444f72e717
data/CHANGELOG.md CHANGED
@@ -1,9 +1,15 @@
1
1
  ## ChangeLog
2
2
 
3
+ - Release 0.1.4 - 2016/09/19
4
+ - Input plugin
5
+ - `pull_interval` can be specified float value
6
+ - `topic` must be specified
3
7
  - Release 0.1.3 - 2016/09/17
4
- - Fix error handling and add debug logging in input plugin
8
+ - Input plugin
9
+ - Fix error handling and add debug logging
5
10
  - Release 0.1.2 - 2016/09/11
6
- - Change default max message size and add debug message
11
+ - Output plugin
12
+ - Change default max message size and add debug message
7
13
  - Release 0.1.1 - 2016/08/27
8
14
  - Bump up google-cloud-pubsub (gcloud-ruby) to 0.20
9
15
  - Release 0.1.0 - 2016/08/22
data/README.md CHANGED
@@ -87,7 +87,7 @@ Use `gcloud_pubsub` input plugin.
87
87
  subscription <YOUR SUBSCRIPTION>
88
88
  max_messages 1000
89
89
  return_immediately true
90
- pull_interval 2
90
+ pull_interval 0.5
91
91
  format json
92
92
  </source>
93
93
  ```
@@ -102,7 +102,7 @@ Use `gcloud_pubsub` input plugin.
102
102
  - Set your credential file path.
103
103
  - Running fluentd on GCP, you can use scope instead of specifying this.
104
104
  - You can also use environment variable such as `GCLOUD_KEYFILE`.
105
- - `topic` (optional)
105
+ - `topic` (required)
106
106
  - Set topic name to pull.
107
107
  - `subscription` (required)
108
108
  - Set subscription name to pull.
@@ -111,7 +111,7 @@ Use `gcloud_pubsub` input plugin.
111
111
  - `return_immediately` (optional, default: `true`)
112
112
  - See returnImmediately on https://cloud.google.com/pubsub/subscriber#receiving-pull-messages
113
113
  - If `return_immediately` is `false`, this plugin ignore `pull_interval`.
114
- - `pull_interval` (optional, default: `5`)
114
+ - `pull_interval` (optional, default: `5.0`)
115
115
  - Pulling messages by intervals of specified seconds.
116
116
  - `format` (optional, default: `json`)
117
117
  - Set input format. See format section in http://docs.fluentd.org/articles/in_tail
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.license = "MIT"
8
8
  gem.homepage = "https://github.com/mia-0032/fluent-plugin-gcloud-pubsub-custom"
9
9
  gem.summary = gem.description
10
- gem.version = "0.1.3"
10
+ gem.version = "0.1.4"
11
11
  gem.authors = ["Yoshihiro MIYAI"]
12
12
  gem.email = "msparrow17@gmail.com"
13
13
  gem.has_rdoc = false
@@ -10,9 +10,9 @@ module Fluent
10
10
  config_param :tag, :string
11
11
  config_param :project, :string, :default => nil
12
12
  config_param :key, :string, :default => nil
13
- config_param :topic, :string, :default => nil
13
+ config_param :topic, :string
14
14
  config_param :subscription, :string
15
- config_param :pull_interval, :integer, :default => 5
15
+ config_param :pull_interval, :float, :default => 5.0
16
16
  config_param :max_messages, :integer, :default => 100
17
17
  config_param :return_immediately, :bool, :default => true
18
18
  config_param :format, :string, :default => 'json'
@@ -37,7 +37,7 @@ class GcloudPubSubInputTest < Test::Unit::TestCase
37
37
  assert_equal('topic-test', d.instance.topic)
38
38
  assert_equal('subscription-test', d.instance.subscription)
39
39
  assert_equal('key-test', d.instance.key)
40
- assert_equal(2, d.instance.pull_interval)
40
+ assert_equal(2.0, d.instance.pull_interval)
41
41
  assert_equal(1000, d.instance.max_messages)
42
42
  assert_equal(true, d.instance.return_immediately)
43
43
  assert_equal('ltsv', d.instance.format)
@@ -45,7 +45,7 @@ class GcloudPubSubInputTest < Test::Unit::TestCase
45
45
 
46
46
  test 'default values are configured' do
47
47
  d = create_driver
48
- assert_equal(5, d.instance.pull_interval)
48
+ assert_equal(5.0, d.instance.pull_interval)
49
49
  assert_equal(100, d.instance.max_messages)
50
50
  assert_equal(true, d.instance.return_immediately)
51
51
  assert_equal('json', d.instance.format)
@@ -131,11 +131,12 @@ class GcloudPubSubInputTest < Test::Unit::TestCase
131
131
  @subscriber.pull(immediate: true, max: 100).twice { raise UnknownError.new('test') }
132
132
  @subscriber.acknowledge.times(0)
133
133
 
134
- d = create_driver(CONFIG + 'pull_interval 1')
134
+ d = create_driver(CONFIG + 'pull_interval 0.5')
135
135
  d.run {
136
- sleep 1 # + 0.5s
136
+ sleep 0.1 # + 0.5s
137
137
  }
138
138
 
139
+ assert_equal(0.5, d.instance.pull_interval)
139
140
  assert_equal(true, d.emits.empty?)
140
141
  end
141
142
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-gcloud-pubsub-custom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshihiro MIYAI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-17 00:00:00.000000000 Z
11
+ date: 2016-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd