class Google::Cloud::Spanner::V1::Spanner::Client::Configuration


@return [::String]
A separate project against which to charge quota.
@!attribute [rw] quota_project
@return [::Hash]
trigger a retry.
* ‘:retry_codes` (type: `Array<String>`) - The error codes that should
* `:multiplier` (type: `Numeric`) - The incremental backoff multiplier.
* `:max_delay` (type: `Numeric`) - The max delay in seconds.
* `:initial_delay` (type: `Numeric`) - The initial delay in seconds.
The retry policy. The value is a hash with the following keys:
@!attribute [rw] retry_policy
@return [::Hash{::Symbol=>::String}]
Additional gRPC headers to be sent with the call.
@!attribute [rw] metadata
@return [::Numeric]
The call timeout in seconds.
@!attribute [rw] timeout
@return [::Array<::GRPC::ClientInterceptor>]
An array of interceptors that are run before calls are executed.
@!attribute [rw] interceptors
@return [::Hash]
`GRPC::Core::Channel` object is provided as the credential.
Extra parameters passed to the gRPC channel. Note: this is ignored if a
@!attribute [rw] channel_args
@return [::String]
The library version as recorded in instrumentation and logging
@!attribute [rw] lib_version
@return [::String]
The library name as recorded in instrumentation and logging
@!attribute [rw] lib_name
@return [::Array<::String>]
The OAuth scopes
@!attribute [rw] scope
@return [::Object]
* (`nil`) indicating no credentials
* (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
* (`GRPC::Core::Channel`) a gRPC channel with included credentials
(see the [signet docs](googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
* (`Signet::OAuth2::Client`) A signet oauth2 client object
(see the [googleauth docs](googleapis.dev/ruby/googleauth/latest/index.html))
* (`Google::Auth::Credentials`) A googleauth credentials object
* (`Hash`) A service account key as a Hash
* (`String`) The path to a service account key file in JSON format
Credentials to send with calls. You may provide any of the following types:
@!attribute [rw] credentials
@return [::String]
Defaults to `“spanner.googleapis.com”`.
The hostname or hostname:port of the service endpoint.
@!attribute [rw] endpoint
end
config.rpcs.create_session.timeout = 20.0
config.timeout = 10.0
client = ::Google::Cloud::Spanner::V1::Spanner::Client.new do |config|
To apply the above configuration only to a new client:
end
config.rpcs.create_session.timeout = 20.0
config.timeout = 10.0
::Google::Cloud::Spanner::V1::Spanner::Client.configure do |config|
to 20 seconds, and all remaining timeouts to 10 seconds:
To modify the global config, setting the timeout for create_session
# Examples
on construction.
Configuration can be applied globally to all clients, or to a single client
for a list of RPCs that can be configured independently.
{::Google::Cloud::Spanner::V1::Spanner::Client::Configuration::Rpcs}
applied individually to specific RPCs. See
parameters, and other low-level controls. Certain parameters can also be
providing control over timeouts, retry behavior, logging, transport
This class represents the configuration for Spanner,
Configuration class for the Spanner API.
#

def initialize parent_config = nil

Other tags:
    Private: -
def initialize parent_config = nil
  @parent_config = parent_config unless parent_config.nil?
  yield self if block_given?
end

def rpcs

Returns:
  • (Rpcs) -
def rpcs
  @rpcs ||= begin
    parent_rpcs = nil
    parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
    Rpcs.new parent_rpcs
  end
end