Google Cloud Spanner C++ Client  1.32.0
A C++ Client Library for Google Cloud Spanner
Classes | Namespaces | Typedefs | Enumerations
options.h File Reference

This file defines options to be used with instances of google::cloud::Options. More...

#include "google/cloud/spanner/backoff_policy.h"
#include "google/cloud/spanner/internal/session.h"
#include "google/cloud/spanner/polling_policy.h"
#include "google/cloud/spanner/request_priority.h"
#include "google/cloud/spanner/retry_policy.h"
#include "google/cloud/spanner/version.h"
#include "google/cloud/options.h"
#include <chrono>
#include <map>
#include <memory>

Go to the source code of this file.

Classes

struct  google::cloud::spanner::v1::SpannerRetryPolicyOption
 Option for google::cloud::Options to set a spanner::RetryPolicy. More...
 
struct  google::cloud::spanner::v1::SpannerBackoffPolicyOption
 Option for google::cloud::Options to set a spanner::BackoffPolicy. More...
 
struct  google::cloud::spanner::v1::SpannerPollingPolicyOption
 Option for google::cloud::Options to set a spanner::PollingPolicy. More...
 
struct  google::cloud::spanner::v1::SessionPoolMinSessionsOption
 Option for google::cloud::Options to set the minimum number of sessions to keep in the pool. More...
 
struct  google::cloud::spanner::v1::SessionPoolMaxSessionsPerChannelOption
 Option for google::cloud::Options to set the maximum number of sessions to create on each channel. More...
 
struct  google::cloud::spanner::v1::SessionPoolMaxIdleSessionsOption
 Option for google::cloud::Options to set the maximum number of sessions to keep in the pool in an idle state. More...
 
struct  google::cloud::spanner::v1::SessionPoolActionOnExhaustionOption
 Option for google::cloud::Options to set the action to take when attempting to allocate a session when the pool is exhausted. More...
 
struct  google::cloud::spanner::v1::SessionPoolKeepAliveIntervalOption
 Option for google::cloud::Options to set the interval at which we refresh sessions so they don't get collected by the backend GC. More...
 
struct  google::cloud::spanner::v1::SessionPoolLabelsOption
 Option for google::cloud::Options to set the labels used when creating sessions within the pool. More...
 
struct  google::cloud::spanner::v1::RequestPriorityOption
 Option for google::cloud::Options to set a spanner::RequestPriority. More...
 
struct  google::cloud::spanner::v1::RequestTagOption
 Option for google::cloud::Options to set a per-request tag. More...
 

Namespaces

 google
 
 google::cloud
 The namespace Google Cloud Platform C++ client libraries.
 
 google::cloud::spanner
 Contains all the Cloud Spanner C++ client types and functions.
 
 google::cloud::spanner::v1
 The inlined, versioned namespace for the Cloud Spanner C++ client APIs.
 

Typedefs

using google::cloud::spanner::v1::SpannerPolicyOptionList = OptionList< spanner::SpannerRetryPolicyOption, SpannerBackoffPolicyOption, SpannerPollingPolicyOption >
 List of all "policy" options. More...
 
using google::cloud::spanner::v1::SessionPoolOptionList = OptionList< SessionPoolMinSessionsOption, SessionPoolMaxSessionsPerChannelOption, SessionPoolMaxIdleSessionsOption, SessionPoolActionOnExhaustionOption, SessionPoolKeepAliveIntervalOption, SessionPoolLabelsOption >
 List of all SessionPool options. More...
 
using google::cloud::spanner::v1::RequestOptionList = OptionList< RequestPriorityOption, RequestTagOption >
 List of all Request options. More...
 

Enumerations

enum class  google::cloud::spanner::v1::ActionOnExhaustion { google::cloud::spanner::v1::kBlock , google::cloud::spanner::v1::kFail }
 Action to take when the session pool is exhausted. More...
 

Detailed Description

This file defines options to be used with instances of google::cloud::Options.

By convention options are named with an "Option" suffix. As the name would imply, all options are optional, and leaving them unset will result in a reasonable default being chosen.

Not all options are meaningful to all functions that accept a google::cloud::Options instance. Each function that accepts a google::cloud::Options should document which options it expects. This is typically done by indicating lists of options using "OptionList" aliases. For example, a function may indicate that users may set any option in SpannerPolicyOptionList.

Note
Unrecognized options are allowed and will be ignored. To debug issues with options set GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes in the environment and unexpected options will be logged.
See also
google::cloud::CommonOptionList
google::cloud::GrpcOptionList

Definition in file options.h.