Google Cloud C++ Client 2.10.1
C++ Client Library for Google Cloud Platform
|
Contains all the Google Cloud C++ Library APIs. More...
Namespaces | |
namespace | mocks |
Contains helpers for testing the Google Cloud C++ Client Libraries. | |
Classes | |
struct | AccessTokenLifetimeOption |
Configure the access token lifetime. More... | |
class | AsyncOperation |
Represents a pending asynchronous operation. More... | |
class | AsyncStreamingReadWriteRpc |
A streaming read-write RPC. More... | |
struct | AsyncTimerResult |
The result of an async timer operation. More... | |
struct | AuthorityOption |
Configure the "authority" attribute. More... | |
class | BackgroundThreads |
A object representing the background threads available to a Client. More... | |
struct | CARootsFilePathOption |
Configures a custom CA (Certificates Authority) certificates file. More... | |
class | CompletionQueue |
Call the functor associated with asynchronous operations when they complete. More... | |
class | ConnectionOptions |
The configuration parameters for client connections. More... | |
class | Credentials |
An opaque representation of the authentication configuration. More... | |
struct | DelegatesOption |
Configure the delegates for MakeImpersonateServiceAccountCredentials() More... | |
struct | EndpointOption |
Change the endpoint. More... | |
class | ErrorInfo |
Describes the cause of the error with structured details. More... | |
struct | ExperimentalTag |
An argument type to indicate experimental functions. More... | |
class | future |
Implement ISO/IEC TS 19571:2016 future<T> . More... | |
class | future< void > |
Implement ISO/IEC TS 19571:2016 future for void. More... | |
class | GenericPollingPolicy |
Construct a polling policy from existing Retry and Backoff policies. More... | |
struct | GrpcBackgroundThreadPoolSizeOption |
The size of the background thread pool. More... | |
struct | GrpcBackgroundThreadsFactoryOption |
Changes the BackgroundThreadsFactory . More... | |
struct | GrpcChannelArgumentsNativeOption |
The native grpc::ChannelArguments object. More... | |
struct | GrpcChannelArgumentsOption |
A string-string map of arguments for grpc::ChannelArguments::SetString . More... | |
struct | GrpcCompletionQueueOption |
The CompletionQueue to use for background gRPC work. More... | |
struct | GrpcCredentialOption |
The gRPC credentials used by clients configured with this object. More... | |
struct | GrpcNumChannelsOption |
The number of transport channels to create. More... | |
struct | GrpcTracingOptionsOption |
The TracingOptions to use when printing grpc protocol buffer messages. More... | |
class | KmsKeyName |
This class identifies a Google Cloud KMS Key. More... | |
class | LogBackend |
The logging backend interface. More... | |
class | Logger |
Define the class to capture a log message. More... | |
class | Logger< false > |
Define the logger for a disabled log level. More... | |
struct | LogRecord |
Represents a single log message. More... | |
class | LogSink |
A sink to receive log records. More... | |
struct | NullStream |
Implements operator<< for all types, without any effect. More... | |
class | Options |
A class that holds option structs indexed by their type. More... | |
class | PollingPolicy |
Control the Cloud C++ client library behavior with respect to polling on long running operations. More... | |
class | Project |
This class identifies a Cloud Project. More... | |
class | promise |
Implement promise<T> as defined in ISO/IEC TS 19571:2016. More... | |
class | promise< void > |
Specialize promise as defined in ISO/IEC TS 19571:2016 for void. More... | |
struct | QuotaUserOption |
Configure the QuotaUser system parameter. More... | |
struct | RestTracingOptionsOption |
The TracingOptions to use when printing REST transport http messages. More... | |
class | RuntimeStatusError |
A runtime error that wraps a google::cloud::Status . More... | |
struct | ScopesOption |
Configure the scopes for MakeImpersonateServiceAccountCredentials() More... | |
struct | ServerTimeoutOption |
Timeout for the server to finish processing the request. More... | |
class | Status |
Represents success or an error with info about the error. More... | |
class | StatusOr |
Holds a value or a Status indicating why there is no value. More... | |
class | StreamRange |
A StreamRange<T> is a range of StatusOr<T> where the end-of-stream is indicated by a non-OK Status . More... | |
struct | TracingComponentsOption |
Return whether tracing is enabled for the given component . More... | |
class | TracingOptions |
The configuration parameters for RPC/protobuf tracing. More... | |
struct | UnifiedCredentialsOption |
A wrapper to store credentials into an options. More... | |
struct | UserAgentProductsOption |
User-agent products to include with each request. More... | |
struct | UserIpOption |
Configure the UserIp query parameter. More... | |
struct | UserProjectOption |
Specifies a project for quota and billing purposes. More... | |
Typedefs | |
using | BackoffPolicy = ::google::cloud::internal::BackoffPolicy |
The base class for backoff policies. More... | |
using | ExponentialBackoffPolicy = google::cloud::internal::ExponentialBackoffPolicy |
A truncated exponential backoff policy with randomized periods. More... | |
using | CommonOptionList = OptionList< EndpointOption, UserAgentProductsOption, TracingComponentsOption, UserProjectOption, AuthorityOption > |
A list of all the common options. More... | |
using | UnifiedCredentialsOptionList = OptionList< AccessTokenLifetimeOption, CARootsFilePathOption, DelegatesOption, ScopesOption, TracingComponentsOption, UnifiedCredentialsOption > |
A list of options related to authentication. More... | |
using | BackgroundThreadsFactory = std::function< std::unique_ptr< BackgroundThreads >()> |
using | GrpcOptionList = OptionList< GrpcCredentialOption, GrpcNumChannelsOption, GrpcChannelArgumentsOption, GrpcChannelArgumentsNativeOption, GrpcTracingOptionsOption, GrpcBackgroundThreadPoolSizeOption, GrpcCompletionQueueOption, GrpcBackgroundThreadsFactoryOption > |
A list of all the gRPC options. More... | |
using | IamUpdater = std::function< absl::optional< google::iam::v1::Policy >(google::iam::v1::Policy)> |
Used in the SetIamPolicy() read-modify-write cycles where an etag helps prevent simultaneous updates of a policy from overwriting each other. More... | |
template<typename T > | |
using | optional = absl::optional< T > |
Alias template for google::cloud::optional. More... | |
template<typename... T> | |
using | OptionList = internal::TypeList< T... > |
A template to hold a list of "option" types. More... | |
using | RestOptionList = ::google::cloud::OptionList< QuotaUserOption, RestTracingOptionsOption, ServerTimeoutOption, UserIpOption > |
The complete list of options accepted by CurlRestClient More... | |
using | TerminateHandler = std::function< void(char const *msg)> |
Terminate handler. More... | |
Enumerations | |
enum class | Idempotency { kIdempotent , kNonIdempotent } |
Whether a request is idempotent. More... | |
enum class | Severity : int { GCP_LS_TRACE , GCP_LS_DEBUG , GCP_LS_INFO , GCP_LS_NOTICE , GCP_LS_WARNING , GCP_LS_ERROR , GCP_LS_CRITICAL , GCP_LS_ALERT , GCP_LS_FATAL , GCP_LS_HIGHEST = GCP_LS_FATAL , GCP_LS_LOWEST = GCP_LS_TRACE , GCP_LS_LOWEST_ENABLED = GOOGLE_CLOUD_CPP_LOGGING_MIN_SEVERITY_ENABLED } |
Define the severity levels for Google Cloud Platform C++ Libraries logging. More... | |
enum class | StatusCode { kOk = 0 , kCancelled = 1 , kUnknown = 2 , kInvalidArgument = 3 , kDeadlineExceeded = 4 , kNotFound = 5 , kAlreadyExists = 6 , kPermissionDenied = 7 , kResourceExhausted = 8 , kFailedPrecondition = 9 , kAborted = 10 , kOutOfRange = 11 , kUnimplemented = 12 , kInternal = 13 , kUnavailable = 14 , kDataLoss = 15 , kUnauthenticated = 16 } |
Well-known status codes with grpc::StatusCode -compatible values. More... | |
Functions | |
std::shared_ptr< Credentials > | MakeInsecureCredentials (Options opts={}) |
Create insecure (aka anonymous, aka unauthenticated) credentials. More... | |
std::shared_ptr< Credentials > | MakeGoogleDefaultCredentials (Options opts={}) |
Creates the default credentials. More... | |
std::shared_ptr< Credentials > | MakeAccessTokenCredentials (std::string const &access_token, std::chrono::system_clock::time_point expiration, Options opts={}) |
Creates credentials with a fixed access token. More... | |
std::shared_ptr< Credentials > | MakeImpersonateServiceAccountCredentials (std::shared_ptr< Credentials > base_credentials, std::string target_service_account, Options opts={}) |
Creates credentials for service account impersonation. More... | |
std::shared_ptr< Credentials > | MakeServiceAccountCredentials (std::string json_object, Options opts={}) |
Creates service account credentials from a service account key. More... | |
std::shared_ptr< Credentials > | MakeExternalAccountCredentials (std::string json_object, Options opts={}) |
Creates credentials based on external accounts. More... | |
template<typename T > | |
future< typename internal::make_ready_return< T >::type > | make_ready_future (T &&t) |
Create a future<void> that is immediately ready. More... | |
future< void > | make_ready_future () |
Create a future<void> that is immediately ready. More... | |
google::cloud::Status | MakeStatusFromRpcError (grpc::Status const &status) |
Creates a google::cloud::Status from a grpc::Status. More... | |
google::cloud::Status | MakeStatusFromRpcError (grpc::StatusCode code, std::string what) |
Creates a google::cloud::Status from a grpc::StatusCode and description. More... | |
google::cloud::Status | MakeStatusFromRpcError (google::rpc::Status const &proto) |
Creates a google::cloud::Status from a google:rpc::Status proto. More... | |
StatusOr< KmsKeyName > | MakeKmsKeyName (std::string const &full_name) |
Constructs a KmsKeyName from the given full_name . More... | |
absl::optional< Severity > | ParseSeverity (std::string const &name) |
Convert a human-readable representation to a Severity. More... | |
std::ostream & | operator<< (std::ostream &os, Severity x) |
Streaming operator, writes a human-readable representation. More... | |
std::ostream & | operator<< (std::ostream &os, LogRecord const &rhs) |
Default formatting of a LogRecord. More... | |
StatusOr< Project > | MakeProject (std::string const &full_name) |
Constructs a Project from the given full_name . More... | |
std::string | StatusCodeToString (StatusCode code) |
Convert code to a human readable string. More... | |
std::ostream & | operator<< (std::ostream &os, StatusCode code) |
Integration with std::iostreams . More... | |
std::ostream & | operator<< (std::ostream &os, Status const &s) |
Stream s to os . More... | |
template<typename T > | |
bool | operator== (StatusOr< T > const &a, StatusOr< T > const &b) |
template<typename T > | |
bool | operator!= (StatusOr< T > const &a, StatusOr< T > const &b) |
template<typename T > | |
StatusOr< T > | make_status_or (T rhs) |
TerminateHandler | SetTerminateHandler (TerminateHandler f) |
Install terminate handler and get the old one atomically. More... | |
TerminateHandler | GetTerminateHandler () |
Get the currently installed handler. More... | |
void | Terminate (char const *msg) |
Invoke the currently installed handler. More... | |
int constexpr | version_major () |
The Google Cloud C++ Client major version. More... | |
int constexpr | version_minor () |
The Google Cloud C++ Client minor version. More... | |
int constexpr | version_patch () |
The Google Cloud C++ Client patch version. More... | |
constexpr char const * | version_pre_release () |
The Google Cloud C++ Client pre-release version. More... | |
int constexpr | version () |
A single integer representing the Major/Minor/Patch version. More... | |
std::string | version_string () |
The version as a string, in MAJOR.MINOR.PATCH[-PRE][+gitrev] format. More... | |
Contains all the Google Cloud C++ Library APIs.
using google::cloud::BackgroundThreadsFactory = typedef std::function<std::unique_ptr<BackgroundThreads>()> |
using google::cloud::BackoffPolicy = typedef ::google::cloud::internal::BackoffPolicy |
The base class for backoff policies.
using google::cloud::CommonOptionList = typedef OptionList<EndpointOption, UserAgentProductsOption, TracingComponentsOption, UserProjectOption, AuthorityOption> |
A list of all the common options.
using google::cloud::ExponentialBackoffPolicy = typedef google::cloud::internal::ExponentialBackoffPolicy |
A truncated exponential backoff policy with randomized periods.
A list of all the gRPC options.
using google::cloud::IamUpdater = typedef std::function<absl::optional<google::iam::v1::Policy>( google::iam::v1::Policy)> |
Used in the SetIamPolicy()
read-modify-write cycles where an etag
helps prevent simultaneous updates of a policy from overwriting each other.
The updater is called with a recently fetched policy, and should either return an empty optional if no changes are required, or return a new policy to be set. In the latter case the updater should either (1) set the etag
of the returned policy to that of the recently fetched policy (strongly suggested), or (2) not set the etag
at all.
In case (1) if the etag
does not match the existing policy (i.e., there has been an intermediate update), this update is dropped and a new cycle is initiated. In case (2) the existing policy is overwritten blindly.
using google::cloud::optional = typedef absl::optional<T> |
Alias template for google::cloud::optional.
absl::optional<T>
directly. using google::cloud::OptionList = typedef internal::TypeList<T...> |
A template to hold a list of "option" types.
This can be a useful way to create meaningful lists of options. For example, there could be a list containing all the gRPC options. Or a list of all ProductX options. This gives us a way to link to lists of options with doxygen, and to do some checking about what options a function may expect.
using google::cloud::RestOptionList = typedef ::google::cloud::OptionList<QuotaUserOption, RestTracingOptionsOption, ServerTimeoutOption, UserIpOption> |
The complete list of options accepted by CurlRestClient
A list of options related to authentication.
|
strong |
Whether a request is idempotent.
When a RPC fails with a retryable error, the google-cloud-cpp
client libraries automatically retry the RPC if the RPC is idempotent. For each service, the library define a policy that determines whether a given request is idempotent. In many cases this can be determined statically, for example, read-only operations are always idempotent. In some cases, the contents of the request may need to be examined to determine if the operation is idempotent. For example, performing operations with pre-conditions, such that the pre-conditions change when the operation succeed, is typically idempotent.
Applications may override the default idempotency policy, though we anticipate that this would be needed only in very rare circumstances. A few examples include:
Enumerator | |
---|---|
kIdempotent | The operation is idempotent and can be retried after a transient failure. |
kNonIdempotent | The operation is not idempotent and should not be retried after a transient failure. |
|
strong |
Define the severity levels for Google Cloud Platform C++ Libraries logging.
These are modelled after the severity level in syslog(1) and many derived tools.
We force the enum to be represented as an int
because we will store the values in an std::atomic<>
and the implementations usually optimize std::atomic<int>
but not std::atomic<Foo>
|
strong |
Well-known status codes with grpc::StatusCode
-compatible values.
The semantics of these values are documented in: https://grpc.io/grpc/cpp/classgrpc_1_1_status.html
|
inline |
Create a future<void> that is immediately ready.
|
inline |
Create a future<void> that is immediately ready.
StatusOr< T > google::cloud::make_status_or | ( | T | rhs | ) |
StatusOr< KmsKeyName > google::cloud::MakeKmsKeyName | ( | std::string const & | full_name | ) |
Constructs a KmsKeyName
from the given full_name
.
Returns a non-OK Status if full_name
is improperly formed.
google::cloud::Status google::cloud::MakeStatusFromRpcError | ( | google::rpc::Status const & | proto | ) |
Creates a google::cloud::Status
from a google:rpc::Status
proto.
Some gRPC services return the google::rpc::Status
proto for errors. The libraries in google-cloud-cpp
represent these errors using a google::cloud::Status
.
google::cloud::Status google::cloud::MakeStatusFromRpcError | ( | grpc::Status const & | status | ) |
Creates a google::cloud::Status from a grpc::Status.
google::cloud::Status google::cloud::MakeStatusFromRpcError | ( | grpc::StatusCode | code, |
std::string | what | ||
) |
Creates a google::cloud::Status from a grpc::StatusCode and description.
bool google::cloud::operator!= | ( | StatusOr< T > const & | a, |
StatusOr< T > const & | b | ||
) |
std::ostream & google::cloud::operator<< | ( | std::ostream & | os, |
LogRecord const & | rhs | ||
) |
Default formatting of a LogRecord.
std::ostream & google::cloud::operator<< | ( | std::ostream & | os, |
Severity | x | ||
) |
Streaming operator, writes a human-readable representation.
std::ostream & google::cloud::operator<< | ( | std::ostream & | os, |
Status const & | s | ||
) |
Stream s
to os
.
This in intended for logging and troubleshooting. Applications should not depend on the format of this output.
std::ostream & google::cloud::operator<< | ( | std::ostream & | os, |
StatusCode | code | ||
) |
Integration with std::iostreams
.
bool google::cloud::operator== | ( | StatusOr< T > const & | a, |
StatusOr< T > const & | b | ||
) |
absl::optional< Severity > google::cloud::ParseSeverity | ( | std::string const & | name | ) |
Convert a human-readable representation to a Severity.
std::string google::cloud::StatusCodeToString | ( | StatusCode | code | ) |
Convert code
to a human readable string.
|
constexpr |
A single integer representing the Major/Minor/Patch version.
|
constexpr |
The Google Cloud C++ Client major version.
|
constexpr |
The Google Cloud C++ Client minor version.
|
constexpr |
The Google Cloud C++ Client patch version.
|
constexpr |
The Google Cloud C++ Client pre-release version.
std::string google::cloud::version_string | ( | ) |
The version as a string, in MAJOR.MINOR.PATCH[-PRE][+gitrev] format.