fluent-plugin-gcloud-pubsub-custom 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -5
- data/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/fluent-plugin-gcloud-pubsub-custom.gemspec +1 -1
- data/lib/fluent/plugin/gcloud_pubsub/client.rb +6 -2
- data/lib/fluent/plugin/in_gcloud_pubsub.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c1d001b87fc5d90ec9539e1fd22792b9d2cd45b
|
4
|
+
data.tar.gz: '0449660048a17af7b4a7626c28ecadee76852392'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b2cc614e5bbdfd0923be3c300ccd4855b5f8598c1e89ed382c2f571529ac461a613f3c2f1404aca25141b6c6093c61c227aa6957e3fa99b04f5b0922ffe31a7
|
7
|
+
data.tar.gz: 3126f3675aadcfbdb06f04d0abbb104d30fc2f5ec593af7cc974839cf9d13e3407ee26cb80c11b6443e46febeb4bbd57fa12ae2bdbb5cdcd8d655d3b59d7ada8
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -133,8 +133,8 @@ Use `gcloud_pubsub` input plugin.
|
|
133
133
|
- Set your credential file path.
|
134
134
|
- Running fluentd on GCP, you can use scope instead of specifying this.
|
135
135
|
- You can also use environment variable such as `GCLOUD_KEYFILE`.
|
136
|
-
- `topic` (
|
137
|
-
- Set topic name to
|
136
|
+
- `topic` (optional)
|
137
|
+
- Set topic name that the subscription belongs to.
|
138
138
|
- `subscription` (required)
|
139
139
|
- Set subscription name to pull.
|
140
140
|
- `max_messages` (optional, default: `100`)
|
@@ -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 = "1.3.
|
10
|
+
gem.version = "1.3.2"
|
11
11
|
gem.authors = ["Yoshihiro MIYAI"]
|
12
12
|
gem.email = "msparrow17@gmail.com"
|
13
13
|
gem.has_rdoc = false
|
@@ -59,8 +59,12 @@ module Fluent
|
|
59
59
|
class Subscriber
|
60
60
|
def initialize(project, key, topic_name, subscription_name)
|
61
61
|
pubsub = Google::Cloud::Pubsub.new project_id: project, credentials: key
|
62
|
-
|
63
|
-
|
62
|
+
if topic_name.nil?
|
63
|
+
@client = pubsub.subscription subscription_name
|
64
|
+
else
|
65
|
+
topic = pubsub.topic topic_name
|
66
|
+
@client = topic.subscription subscription_name
|
67
|
+
end
|
64
68
|
raise Error.new "subscription:#{subscription_name} does not exist." if @client.nil?
|
65
69
|
end
|
66
70
|
|
@@ -26,7 +26,7 @@ module Fluent::Plugin
|
|
26
26
|
desc 'Set your credential file path.'
|
27
27
|
config_param :key, :string, default: nil
|
28
28
|
desc 'Set topic name to pull.'
|
29
|
-
config_param :topic, :string
|
29
|
+
config_param :topic, :string, default: nil
|
30
30
|
desc 'Set subscription name to pull.'
|
31
31
|
config_param :subscription, :string
|
32
32
|
desc 'Pulling messages by intervals of specified seconds.'
|
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: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshihiro MIYAI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|