Module: Google::Cloud
- Defined in:
- lib/google-cloud-pubsub.rb,
lib/google/cloud/pubsub.rb,
lib/google/cloud/pubsub/topic.rb,
lib/google/cloud/pubsub/errors.rb,
lib/google/cloud/pubsub/policy.rb,
lib/google/cloud/pubsub/schema.rb,
lib/google/cloud/pubsub/convert.rb,
lib/google/cloud/pubsub/message.rb,
lib/google/cloud/pubsub/project.rb,
lib/google/cloud/pubsub/service.rb,
lib/google/cloud/pubsub/version.rb,
lib/google/cloud/pubsub/snapshot.rb,
lib/google/cloud/pubsub/subscriber.rb,
lib/google/cloud/pubsub/topic/list.rb,
lib/google/cloud/pubsub/credentials.rb,
lib/google/cloud/pubsub/schema/list.rb,
lib/google/cloud/pubsub/retry_policy.rb,
lib/google/cloud/pubsub/subscription.rb,
lib/google/cloud/pubsub/snapshot/list.rb,
lib/google/cloud/pubsub/publish_result.rb,
lib/google/cloud/pubsub/async_publisher.rb,
lib/google/cloud/pubsub/batch_publisher.rb,
lib/google/cloud/pubsub/flow_controller.rb,
lib/google/cloud/pubsub/received_message.rb,
lib/google/cloud/pubsub/subscriber/stream.rb,
lib/google/cloud/pubsub/subscription/list.rb,
lib/google/cloud/pubsub/acknowledge_result.rb,
lib/google/cloud/pubsub/subscriber/inventory.rb,
lib/google/cloud/pubsub/subscriber/sequencer.rb,
lib/google/cloud/pubsub/async_publisher/batch.rb,
lib/google/cloud/pubsub/subscription/push_config.rb,
lib/google/cloud/pubsub/subscriber/enumerator_queue.rb,
lib/google/cloud/pubsub/subscriber/timed_unary_buffer.rb
Defined Under Namespace
Modules: PubSub
Lifecycle collapse
- Pubsub =
Legacy veneer namespace
PubSub
Class Method Summary collapse
-
.pubsub(project_id = nil, credentials = nil, scope: nil, timeout: nil) ⇒ Google::Cloud::PubSub::Project
Creates a new object for connecting to the Pub/Sub service.
Instance Method Summary collapse
-
#pubsub(scope: nil, timeout: nil) ⇒ Google::Cloud::PubSub::Project
Creates a new object for connecting to the Pub/Sub service.
Class Method Details
.pubsub(project_id = nil, credentials = nil, scope: nil, timeout: nil) ⇒ Google::Cloud::PubSub::Project
Creates a new object for connecting to the Pub/Sub service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
102 103 104 105 106 107 108 |
# File 'lib/google-cloud-pubsub.rb', line 102 def self.pubsub project_id = nil, credentials = nil, scope: nil, timeout: nil require "google/cloud/pubsub" Google::Cloud::PubSub.new project_id: project_id, credentials: credentials, scope: scope, timeout: timeout end |
Instance Method Details
#pubsub(scope: nil, timeout: nil) ⇒ Google::Cloud::PubSub::Project
Creates a new object for connecting to the Pub/Sub service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
63 64 65 66 |
# File 'lib/google-cloud-pubsub.rb', line 63 def pubsub scope: nil, timeout: nil timeout ||= @timeout Google::Cloud.pubsub @project, @keyfile, scope: scope, timeout: timeout end |