fluent-plugin-google-cloud 0.6.13.pre.memory.1 → 0.6.13.pre.memory.2
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/Gemfile.lock +3 -3
- data/fluent-plugin-google-cloud.gemspec +2 -2
- data/lib/fluent/plugin/out_google_cloud.rb +21 -20
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26e55203b2c40d92dfa4087065c41b547291cdf0
|
|
4
|
+
data.tar.gz: dc3d1822611b4dfc35e00980449e525ab54e75e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 670621b542a34fe36eac6b2ca0dda0a59043116476a61068060c7622c4def2def173e7d11342483e4f1b4bcf192cab2e0f736745558160e700c6ee7575189c2a
|
|
7
|
+
data.tar.gz: 1b37a3134df21f2fa17685f93f1ba2f2b1bb6a260add960a26b6dc6cd764f1cc42fff2581ac2bcfb739bddc01bd168bf6d23cecce8a422b022a8e9b306f7436e
|
data/Gemfile.lock
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
fluent-plugin-google-cloud (0.6.13.pre.memory.
|
|
4
|
+
fluent-plugin-google-cloud (0.6.13.pre.memory.2)
|
|
5
5
|
fluentd (~> 0.10)
|
|
6
6
|
google-api-client (~> 0.14)
|
|
7
7
|
google-cloud-logging (~> 1.2.3)
|
|
8
8
|
googleapis-common-protos (~> 1.3)
|
|
9
9
|
googleauth (~> 0.5)
|
|
10
|
-
grpc (~> 1.8)
|
|
10
|
+
grpc (~> 1.8.3)
|
|
11
11
|
json (~> 1.8)
|
|
12
12
|
|
|
13
13
|
GEM
|
|
@@ -55,7 +55,7 @@ GEM
|
|
|
55
55
|
googleauth (~> 0.5.1)
|
|
56
56
|
grpc (~> 1.0)
|
|
57
57
|
rly (~> 0.2.3)
|
|
58
|
-
google-protobuf (3.5.1)
|
|
58
|
+
google-protobuf (3.5.1.1)
|
|
59
59
|
googleapis-common-protos (1.3.7)
|
|
60
60
|
google-protobuf (~> 3.0)
|
|
61
61
|
googleapis-common-protos-types (~> 1.0)
|
|
@@ -10,7 +10,7 @@ eos
|
|
|
10
10
|
gem.homepage =
|
|
11
11
|
'https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud'
|
|
12
12
|
gem.license = 'Apache-2.0'
|
|
13
|
-
gem.version = '0.6.13.pre.memory.
|
|
13
|
+
gem.version = '0.6.13.pre.memory.2'
|
|
14
14
|
gem.authors = ['Todd Derr', 'Alex Robinson']
|
|
15
15
|
gem.email = ['salty@google.com']
|
|
16
16
|
gem.required_ruby_version = Gem::Requirement.new('>= 2.0')
|
|
@@ -24,7 +24,7 @@ eos
|
|
|
24
24
|
gem.add_runtime_dependency 'google-api-client', '~> 0.14'
|
|
25
25
|
gem.add_runtime_dependency 'google-cloud-logging', '~> 1.2.3'
|
|
26
26
|
gem.add_runtime_dependency 'googleauth', '~> 0.5'
|
|
27
|
-
gem.add_runtime_dependency 'grpc', '~> 1.8'
|
|
27
|
+
gem.add_runtime_dependency 'grpc', '~> 1.8.3'
|
|
28
28
|
gem.add_runtime_dependency 'json', '~> 1.8'
|
|
29
29
|
|
|
30
30
|
gem.add_development_dependency 'mocha', '~> 1.1'
|
|
@@ -195,7 +195,7 @@ module Fluent
|
|
|
195
195
|
Fluent::Plugin.register_output('google_cloud', self)
|
|
196
196
|
|
|
197
197
|
PLUGIN_NAME = 'Fluentd Google Cloud Logging plugin'.freeze
|
|
198
|
-
PLUGIN_VERSION = '0.6.13.pre.memory.
|
|
198
|
+
PLUGIN_VERSION = '0.6.13.pre.memory.2'.freeze
|
|
199
199
|
|
|
200
200
|
# Name of the the Google cloud logging write scope.
|
|
201
201
|
LOGGING_SCOPE = 'https://www.googleapis.com/auth/logging.write'.freeze
|
|
@@ -1798,16 +1798,6 @@ module Fluent
|
|
|
1798
1798
|
end
|
|
1799
1799
|
|
|
1800
1800
|
def init_api_client
|
|
1801
|
-
return if @use_grpc
|
|
1802
|
-
# TODO: Use a non-default ClientOptions object.
|
|
1803
|
-
Google::Apis::ClientOptions.default.application_name = PLUGIN_NAME
|
|
1804
|
-
Google::Apis::ClientOptions.default.application_version = PLUGIN_VERSION
|
|
1805
|
-
@client = Google::Apis::LoggingV2::LoggingService.new
|
|
1806
|
-
@client.authorization = Google::Auth.get_application_default(
|
|
1807
|
-
LOGGING_SCOPE)
|
|
1808
|
-
end
|
|
1809
|
-
|
|
1810
|
-
def api_client
|
|
1811
1801
|
if @use_grpc
|
|
1812
1802
|
ssl_creds = GRPC::Core::ChannelCredentials.new
|
|
1813
1803
|
authentication = Google::Auth.get_application_default
|
|
@@ -1817,15 +1807,26 @@ module Fluent
|
|
|
1817
1807
|
channel: GRPC::Core::Channel.new(
|
|
1818
1808
|
'logging.googleapis.com', nil, creds))
|
|
1819
1809
|
else
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1810
|
+
# TODO: Use a non-default ClientOptions object.
|
|
1811
|
+
Google::Apis::ClientOptions.default.application_name = PLUGIN_NAME
|
|
1812
|
+
Google::Apis::ClientOptions.default.application_version = PLUGIN_VERSION
|
|
1813
|
+
@client = Google::Apis::LoggingV2::LoggingService.new
|
|
1814
|
+
@client.authorization = Google::Auth.get_application_default(
|
|
1815
|
+
LOGGING_SCOPE)
|
|
1816
|
+
end
|
|
1817
|
+
end
|
|
1818
|
+
|
|
1819
|
+
def api_client
|
|
1820
|
+
# For gRPC side, the Channel will take care of tokens and their renewal
|
|
1821
|
+
# (https://grpc.io/docs/guides/auth.html#authentication-api).
|
|
1822
|
+
if !@use_grpc && @client.authorization.expired?
|
|
1823
|
+
begin
|
|
1824
|
+
@client.authorization.fetch_access_token!
|
|
1825
|
+
rescue MultiJson::ParseError
|
|
1826
|
+
# Workaround an issue in the API client; just re-raise a more
|
|
1827
|
+
# descriptive error for the user (which will still cause a retry).
|
|
1828
|
+
raise Google::APIClient::ClientError,
|
|
1829
|
+
'Unable to fetch access token (no scopes configured?)'
|
|
1829
1830
|
end
|
|
1830
1831
|
end
|
|
1831
1832
|
@client
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-google-cloud
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.13.pre.memory.
|
|
4
|
+
version: 0.6.13.pre.memory.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Todd Derr
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-01-
|
|
12
|
+
date: 2018-01-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: fluentd
|
|
@@ -87,14 +87,14 @@ dependencies:
|
|
|
87
87
|
requirements:
|
|
88
88
|
- - "~>"
|
|
89
89
|
- !ruby/object:Gem::Version
|
|
90
|
-
version:
|
|
90
|
+
version: 1.8.3
|
|
91
91
|
type: :runtime
|
|
92
92
|
prerelease: false
|
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
|
94
94
|
requirements:
|
|
95
95
|
- - "~>"
|
|
96
96
|
- !ruby/object:Gem::Version
|
|
97
|
-
version:
|
|
97
|
+
version: 1.8.3
|
|
98
98
|
- !ruby/object:Gem::Dependency
|
|
99
99
|
name: json
|
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|