15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_OPTIONS_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_OPTIONS_H
18#include "google/cloud/background_threads.h"
19#include "google/cloud/completion_queue.h"
20#include "google/cloud/options.h"
21#include "google/cloud/tracing_options.h"
22#include "google/cloud/version.h"
23#include <grpcpp/grpcpp.h>
32
33
34
35
37 using Type = std::shared_ptr<grpc::ChannelCredentials>;
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
79 using Type = std::map<std::string, std::string>;
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
102 using Type = grpc::ChannelArguments;
106
107
108
109
115
116
117
118
119
120
121
122
123
124
125
126
128 using Type = std::size_t;
132
133
134
135
136
137
138
139
140
141
142
143
148using BackgroundThreadsFactory =
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
170 using Type = BackgroundThreadsFactory;
174
175
176using GrpcOptionList =
185
186
187
188
189
190
191
192
193
194struct GrpcSetupOption {
195 using Type = std::function<
void(grpc::ClientContext&)>;
199
200
201
202
203
204
205
206
207
208
209
210struct GrpcSetupPollOption {
211 using Type = std::function<
void(grpc::ClientContext&)>;
215void ConfigureContext(grpc::ClientContext& context,
Options const& opts);
218void ConfigurePollContext(grpc::ClientContext& context,
Options const& opts);
221grpc::ChannelArguments MakeChannelArguments(
Options const& opts);
224absl::optional<
int> GetIntChannelArgument(grpc::ChannelArguments
const& args,
225 std::string
const& key);
228absl::optional<std::string> GetStringChannelArgument(
229 grpc::ChannelArguments
const& args, std::string
const& key);
232
233
234
235
236
237BackgroundThreadsFactory MakeBackgroundThreadsFactory(
Options const& opts
= {});
A object representing the background threads available to a Client.
Definition: background_threads.h:27
Call the functor associated with asynchronous operations when they complete.
Definition: completion_queue.h:47
A class that holds option structs indexed by their type.
Definition: options.h:91
Options()=default
Constructs an empty instance.
The configuration parameters for RPC/protobuf tracing.
Definition: tracing_options.h:33
Contains all the Google Cloud C++ Library APIs.
Definition: async_operation.h:23
Definition: async_operation.h:22
The size of the background thread pool.
Definition: grpc_options.h:127
Changes the BackgroundThreadsFactory.
Definition: grpc_options.h:169
The native grpc::ChannelArguments object.
Definition: grpc_options.h:101
A string-string map of arguments for grpc::ChannelArguments::SetString.
Definition: grpc_options.h:78
The CompletionQueue to use for background gRPC work.
Definition: grpc_options.h:144
The gRPC credentials used by clients configured with this object.
Definition: grpc_options.h:36
The number of transport channels to create.
Definition: grpc_options.h:56
The TracingOptions to use when printing grpc protocol buffer messages.
Definition: grpc_options.h:110
#define GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Definition: version.h:45
#define GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
Definition: version.h:43