Method: Google::Cloud::Monitoring::V3::QueryService::Client.configure

Defined in:
lib/google/cloud/monitoring/v3/query_service/client.rb

.configure {|config| ... } ⇒ Client::Configuration

Configure the QueryService Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all QueryService clients
::Google::Cloud::Monitoring::V3::QueryService::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:

[View source]

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/google/cloud/monitoring/v3/query_service/client.rb', line 56

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "Monitoring", "V3"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config
  end
  yield @configure if block_given?
  @configure
end