Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
|
Describes the configuration for a storage::Client
object.
More...
#include <google/cloud/storage/client_options.h>
Static Public Member Functions | |
static StatusOr< ClientOptions > | CreateDefaultClientOptions () |
Creates a ClientOptions with Google Application Default Credentials. More... | |
static StatusOr< ClientOptions > | CreateDefaultClientOptions (ChannelOptions const &channel_options) |
Describes the configuration for a storage::Client
object.
By default, several environment variables are read to configure the client:
CLOUD_STORAGE_EMULATOR_ENDPOINT
: if set, use this http endpoint to make all http requests instead of the production GCS service. Also, if set, the CreateDefaultClientOptions()
function will use an AnonymousCredentials
object instead of loading Application Default Credentials.CLOUD_STORAGE_ENABLE_CLOG
: if set, enable std::clog as a backend for google::cloud::LogSink
.CLOUD_STORAGE_ENABLE_TRACING
: if set, this is the list of components that will have logging enabled, the component this is:
http
: trace all http request / responses.
|
inlineexplicit |
Constructor with channel options.
credentials | how to authenticate to the client. Using a nullptr for credentials results in undefined behavior. |
google::cloud::storage::ClientOptions::ClientOptions | ( | std::shared_ptr< oauth2::Credentials > | credentials, |
ChannelOptions | channel_options | ||
) |
Constructor with channel options.
credentials | how to authenticate to the client. Using a nullptr for credentials results in undefined behavior. |
channel_options | the configuration for SSL certificate validation. |
|
inline |
|
inline |
add_user_agent_prefix()
instead.
|
inline |
|
inline |
|
inline |
|
static |
Creates a ClientOptions
with Google Application Default Credentials.
If Application Default Credentials could not be loaded, this returns a Status
with failure details. If the CLOUD_STORAGE_EMULATOR_ENDPOINT
environment variable is set, this function instead uses an AnonymousCredentials
to configure the client.
|
static |
|
inline |
|
inline |
|
inline |
Control the maximum amount of time allowed for "stalls" during a download.
A download that receives no data is considered "stalled". If the download remains stalled for more than the time set in this option then the download is aborted.
The default value is 2 minutes. Can be disabled by setting the value to 0.
bool google::cloud::storage::ClientOptions::enable_http_tracing | ( | ) | const |
bool google::cloud::storage::ClientOptions::enable_raw_client_tracing | ( | ) | const |
|
inline |
|
inline |
If true and using OpenSSL 1.0.2 the library configures the OpenSSL callbacks for locking.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
ClientOptions & google::cloud::storage::ClientOptions::set_enable_http_tracing | ( | bool | enable | ) |
ClientOptions & google::cloud::storage::ClientOptions::set_enable_raw_client_tracing | ( | bool | enable | ) |
|
inline |
|
inline |
If true and using OpenSSL 1.0.2 the library configures the OpenSSL callbacks for locking.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
ClientOptions & google::cloud::storage::ClientOptions::SetDownloadBufferSize | ( | std::size_t | size | ) |
ClientOptions & google::cloud::storage::ClientOptions::SetUploadBufferSize | ( | std::size_t | size | ) |
|
inline |
|
inline |
|
inline |