Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
Loading...
Searching...
No Matches
grpc_plugin.h
1// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_GRPC_PLUGIN_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_GRPC_PLUGIN_H
17
18#include "google/cloud/storage/client.h"
19#include "google/cloud/storage/version.h"
20#include "google/cloud/status_or.h"
21
22namespace google {
23namespace cloud {
24/**
25 * Contains experimental features for the GCS C++ Client Library.
26 *
27 * @warning The types, functions, aliases, and objects in this namespace are
28 * subject to change without notice. Some of these features depend on aspects
29 * of the service that are not generally available, do not have an SLA, and
30 * may require projects to be allow-listed.
31 */
32namespace storage_experimental {
33GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
34
35/**
36 * Configure the GCS+gRPC plugin.
37 *
38 * - "none": use REST, disables gRPC.
39 * - "media": use gRPC for media (aka data, aka I/O) operations, and REST for
40 * all other requests. In other words, only `ReadObject()`, `WriteObject()`,
41 * and `InsertObject()` use gRPC.
42 * - "metadata": use gRPC for all operations.
43 *
44 * @warning GCS+gRPC is an experimental feature of the C++ client library, and
45 * subject to change without notice. The service itself is not generally
46 * available, does not have an SLA and requires projects to be allow-listed.
47 */
48struct GrpcPluginOption {
49 using Type = std::string;
50};
51
52/**
53 * Create a `google::cloud::storage::Client` object configured to use gRPC.
54 *
55 * @note The Credentials parameter in the configuration is ignored. The gRPC
56 * client only supports Google Default Credentials.
57 *
58 * @param opts the configuration parameters for the Client.
59 *
60 * @warning This is an experimental feature, and subject to change without
61 * notice.
62 *
63 * @par Example
64 * @snippet storage_grpc_samples.cc grpc-read-write
65 */
67
68GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
69} // namespace storage_experimental
70} // namespace cloud
71} // namespace google
72
73#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_GRPC_PLUGIN_H
The Google Cloud Storage (GCS) Client.
Definition: client.h:263
Contains experimental features for the GCS C++ Client Library.
Definition: async_client.h:27
google::cloud::storage::Client DefaultGrpcClient(Options opts={})
Create a google::cloud::storage::Client object configured to use gRPC.
Contains all the Google Cloud Storage C++ client APIs.
Definition: auto_finalize.h:24
Configure the GCS+gRPC plugin.
Definition: grpc_plugin.h:48