module Google::Cloud

def self.storage project_id = nil, credentials = nil, scope: nil,

Returns:
  • (Google::Cloud::Storage::Project) -

Parameters:
  • upload_chunk_size (Integer) -- The chunk size of storage upload, in bytes.
  • send_timeout (Integer) -- How long, in seconds, before receiving response from server times out. Optional.
  • read_timeout (Integer) -- How long, in seconds, before requests time out. Optional.
  • open_timeout (Integer) -- How long, in seconds, before failed connections time out. Optional.
  • timeout (Integer) -- (default timeout) The max duration, in seconds, to wait before timing out. Optional.
  • multiplier (Integer) -- Each successive interval grows by this factor. A multipler of 1.5 means the next
  • max_interval (Integer) -- The maximum interval in seconds that any individual retry can reach.
  • base_interval (Float) -- The initial interval in seconds between tries.
  • max_elapsed_time (Integer) -- Total time in seconds that requests are allowed to keep being retried.
  • retries (Integer) -- Number of times to retry requests on server
  • scope (String, Array) -- The OAuth 2.0 scopes controlling the
  • credentials (String, Hash, Google::Auth::Credentials) -- The path to
  • project_id (String) -- Project identifier for the Storage service
def self.storage project_id = nil, credentials = nil, scope: nil,
                 retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil,
                 max_elapsed_time: nil, base_interval: nil, max_interval: nil, multiplier: nil,
                 upload_chunk_size: nil
  require "google/cloud/storage"
  Google::Cloud::Storage.new project_id: project_id,
                             credentials: credentials,
                             scope: scope,
                             retries: retries,
                             timeout: timeout,
                             open_timeout: open_timeout || timeout,
                             read_timeout: read_timeout || timeout,
                             send_timeout: send_timeout || timeout,
                             max_elapsed_time: max_elapsed_time,
                             base_interval: base_interval,
                             max_interval: max_interval,
                             multiplier: multiplier,
                             upload_chunk_size: upload_chunk_size
end

def storage scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil,

Other tags:
    Example: The default scope can be overridden with the `scope` option: -

Returns:
  • (Google::Cloud::Storage::Project) -

Parameters:
  • upload_chunk_size (Integer) -- The chunk size of storage upload, in bytes.
  • send_timeout (Integer) -- How long, in seconds, before receiving response from server times out. Optional.
  • read_timeout (Integer) -- How long, in seconds, before requests time out. Optional.
  • open_timeout (Integer) -- How long, in seconds, before failed connections time out. Optional.
  • timeout (Integer) -- (default timeout) The max duration, in seconds, to wait before timing out. Optional.
  • multiplier (Integer) -- Each successive interval grows by this factor. A multipler of 1.5 means the next
  • max_interval (Integer) -- The maximum interval in seconds that any individual retry can reach.
  • base_interval (Float) -- The initial interval in seconds between tries.
  • max_elapsed_time (Integer) -- Total time in seconds that requests are allowed to keep being retried.
  • retries (Integer) -- Number of times to retry requests on server
  • scope (String, Array) -- The OAuth 2.0 scopes controlling the

Other tags:
    See: https://cloud.google.com/storage/docs/authentication#oauth - Storage
def storage scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil,
            max_elapsed_time: nil, base_interval: nil, max_interval: nil, multiplier: nil, upload_chunk_size: nil
  Google::Cloud.storage @project, @keyfile, scope: scope,
                                            retries: retries || @retries,
                                            timeout: timeout || @timeout,
                                            open_timeout: open_timeout || timeout,
                                            read_timeout: read_timeout || timeout,
                                            send_timeout: send_timeout || timeout,
                                            max_elapsed_time: max_elapsed_time,
                                            base_interval: base_interval,
                                            max_interval: max_interval,
                                            multiplier: multiplier,
                                            upload_chunk_size: upload_chunk_size
end