google-cloud-eventarc-publishing 1.2.1 → 1.3.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 +31 -1
- data/lib/google/cloud/eventarc/publishing/version.rb +1 -1
- data/lib/google/cloud/eventarc/publishing.rb +45 -4
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a80588188f9cd6c796693487b639d9a27e94d2ec804dac6284a16002a1f7be92
|
4
|
+
data.tar.gz: b45d743eee9fbff14eb869edbc48924938a026ddf5e894cd1e2cc9b38579bd8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 563a17aa9c04707445fd2e42861a5b1433c21d713cf1741d7cc4211821e3fcca2b51f544588a180421ebae56242d9558efe001105efb12cc6f2030ac159bbbf4
|
7
|
+
data.tar.gz: d9d2ede0a3a0b647cf3a6a9e69d61f7ff146d5fc386342e32baa0c5568b48d82c02f3a2069e659109a671d7d853b2fa85e39b6b3a60000e6cd0122138d7a67d0
|
data/README.md
CHANGED
@@ -34,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
|
|
34
34
|
1. [Enable the API.](https://console.cloud.google.com/apis/library/eventarcpublishing.googleapis.com)
|
35
35
|
1. {file:AUTHENTICATION.md Set up authentication.}
|
36
36
|
|
37
|
+
## Debug Logging
|
38
|
+
|
39
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
40
|
+
your application's integration with the API. When logging is activated, key
|
41
|
+
events such as requests and responses, along with data payloads and metadata
|
42
|
+
such as headers and client configuration, are logged to the standard error
|
43
|
+
stream.
|
44
|
+
|
45
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
46
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
47
|
+
customers, private keys, or other security data that could be compromising if
|
48
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
49
|
+
the principle of least access. Google also recommends that Client Library Debug
|
50
|
+
Logging be enabled only temporarily during active debugging, and not used
|
51
|
+
permanently in production.
|
52
|
+
|
53
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
54
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
55
|
+
list of client library gem names. This will select the default logging behavior,
|
56
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
57
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
58
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
59
|
+
results in logs appearing alongside your application logs in the
|
60
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
61
|
+
|
62
|
+
Debug logging also requires that the versioned clients for this service be
|
63
|
+
sufficiently recent, released after about Dec 10, 2024. If logging is not
|
64
|
+
working, try updating the versioned clients in your bundle or installed gems:
|
65
|
+
[google-cloud-eventarc-publishing-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest).
|
66
|
+
|
37
67
|
## Supported Ruby Versions
|
38
68
|
|
39
|
-
This library is supported on Ruby
|
69
|
+
This library is supported on Ruby 3.0+.
|
40
70
|
|
41
71
|
Google provides official support for Ruby versions that are actively supported
|
42
72
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -59,6 +59,11 @@ module Google
|
|
59
59
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
60
60
|
# the `transport` parameter.
|
61
61
|
#
|
62
|
+
# Raises an exception if the currently installed versioned client gem for the
|
63
|
+
# given API version does not support the given transport of the Publisher service.
|
64
|
+
# You can determine whether the method will succeed by calling
|
65
|
+
# {Google::Cloud::Eventarc::Publishing.publisher_available?}.
|
66
|
+
#
|
62
67
|
# ## About Publisher
|
63
68
|
#
|
64
69
|
# Eventarc processes events generated by an event provider and delivers them to
|
@@ -74,16 +79,21 @@ module Google
|
|
74
79
|
# A subscriber is a GCP customer interested in receiving events.
|
75
80
|
#
|
76
81
|
# Channel is a first-class Eventarc resource that is created and managed
|
77
|
-
# by the subscriber in their
|
78
|
-
# intent to receive events from an event provider. A Channel is
|
79
|
-
# exactly one event provider.
|
82
|
+
# by the subscriber in their Google Cloud project. A Channel represents a
|
83
|
+
# subscriber's intent to receive events from an event provider. A Channel is
|
84
|
+
# associated with exactly one event provider.
|
80
85
|
#
|
81
86
|
# ChannelConnection is a first-class Eventarc resource that
|
82
|
-
# is created and managed by the partner in their
|
87
|
+
# is created and managed by the partner in their Google Cloud project. A
|
83
88
|
# ChannelConnection represents a connection between a partner and a
|
84
89
|
# subscriber's Channel. A ChannelConnection has a one-to-one mapping with a
|
85
90
|
# Channel.
|
86
91
|
#
|
92
|
+
# Bus is a first-class Eventarc resource that is created and managed in a
|
93
|
+
# Google Cloud project. A Bus provides a discoverable endpoint for events and
|
94
|
+
# is a router that receives all events published by event providers and
|
95
|
+
# delivers them to zero or more subscribers.
|
96
|
+
#
|
87
97
|
# Publisher allows an event provider to publish events to Eventarc.
|
88
98
|
#
|
89
99
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
@@ -103,6 +113,37 @@ module Google
|
|
103
113
|
service_module.const_get(:Client).new(&block)
|
104
114
|
end
|
105
115
|
|
116
|
+
##
|
117
|
+
# Determines whether the Publisher service is supported by the current client.
|
118
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Eventarc::Publishing.publisher}.
|
119
|
+
# If false, that method will raise an exception. This could happen if the given
|
120
|
+
# API version does not exist or does not support the Publisher service,
|
121
|
+
# or if the versioned client gem needs an update to support the Publisher service.
|
122
|
+
#
|
123
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
124
|
+
# Defaults to `:v1`.
|
125
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
126
|
+
# @return [boolean] Whether the service is available.
|
127
|
+
#
|
128
|
+
def self.publisher_available? version: :v1, transport: :grpc
|
129
|
+
require "google/cloud/eventarc/publishing/#{version.to_s.downcase}"
|
130
|
+
package_name = Google::Cloud::Eventarc::Publishing
|
131
|
+
.constants
|
132
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
133
|
+
.first
|
134
|
+
return false unless package_name
|
135
|
+
service_module = Google::Cloud::Eventarc::Publishing.const_get package_name
|
136
|
+
return false unless service_module.const_defined? :Publisher
|
137
|
+
service_module = service_module.const_get :Publisher
|
138
|
+
if transport == :rest
|
139
|
+
return false unless service_module.const_defined? :Rest
|
140
|
+
service_module = service_module.const_get :Rest
|
141
|
+
end
|
142
|
+
service_module.const_defined? :Client
|
143
|
+
rescue ::LoadError
|
144
|
+
false
|
145
|
+
end
|
146
|
+
|
106
147
|
##
|
107
148
|
# Configure the google-cloud-eventarc-publishing library.
|
108
149
|
#
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-eventarc-publishing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-07 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: google-cloud-core
|
@@ -64,7 +63,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
64
63
|
licenses:
|
65
64
|
- Apache-2.0
|
66
65
|
metadata: {}
|
67
|
-
post_install_message:
|
68
66
|
rdoc_options: []
|
69
67
|
require_paths:
|
70
68
|
- lib
|
@@ -72,15 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
70
|
requirements:
|
73
71
|
- - ">="
|
74
72
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
73
|
+
version: '3.0'
|
76
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
75
|
requirements:
|
78
76
|
- - ">="
|
79
77
|
- !ruby/object:Gem::Version
|
80
78
|
version: '0'
|
81
79
|
requirements: []
|
82
|
-
rubygems_version: 3.5
|
83
|
-
signing_key:
|
80
|
+
rubygems_version: 3.6.5
|
84
81
|
specification_version: 4
|
85
82
|
summary: API Client library for the Eventarc Publishing API
|
86
83
|
test_files: []
|