GRPC C++  1.46.2
grpc_types.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_IMPL_CODEGEN_GRPC_TYPES_H
20 #define GRPC_IMPL_CODEGEN_GRPC_TYPES_H
21 
22 // IWYU pragma: private
23 
25 
26 #include <stddef.h>
27 
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 typedef enum {
41 
42 typedef struct grpc_byte_buffer {
43  void* reserved;
46  struct /* internal */ {
47  void* reserved[8];
48  } reserved;
52  } raw;
53  } data;
55 
59 
61 typedef struct grpc_channel grpc_channel;
62 
64 typedef struct grpc_server grpc_server;
65 
69 typedef struct grpc_call grpc_call;
70 
73 
76 
78 typedef enum {
83 
84 typedef struct grpc_arg_pointer_vtable {
85  void* (*copy)(void* p);
86  void (*destroy)(void* p);
87  int (*cmp)(void* p, void* q);
89 
102 typedef struct {
104  char* key;
106  char* string;
107  int integer;
109  void* p;
111  } pointer;
112  } value;
113 } grpc_arg;
114 
131 typedef struct {
132  size_t num_args;
135 
141 #define GRPC_ARG_ENABLE_CENSUS "grpc.census"
142 
143 #define GRPC_ARG_ENABLE_LOAD_REPORTING "grpc.loadreporting"
144 
146 #define GRPC_ARG_MINIMAL_STACK "grpc.minimal_stack"
147 
149 #define GRPC_ARG_MAX_CONCURRENT_STREAMS "grpc.max_concurrent_streams"
150 
152 #define GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH "grpc.max_receive_message_length"
153 
155 #define GRPC_ARG_MAX_MESSAGE_LENGTH GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH
156 
158 #define GRPC_ARG_MAX_SEND_MESSAGE_LENGTH "grpc.max_send_message_length"
159 
162 #define GRPC_ARG_MAX_CONNECTION_IDLE_MS "grpc.max_connection_idle_ms"
163 
165 #define GRPC_ARG_MAX_CONNECTION_AGE_MS "grpc.max_connection_age_ms"
166 
168 #define GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS "grpc.max_connection_age_grace_ms"
169 
172 #define GRPC_ARG_CLIENT_IDLE_TIMEOUT_MS "grpc.client_idle_timeout_ms"
173 
175 #define GRPC_ARG_ENABLE_PER_MESSAGE_COMPRESSION "grpc.per_message_compression"
176 
179 #define GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION \
180  "grpc.per_message_decompression"
181 
183 #define GRPC_ARG_ENABLE_DEADLINE_CHECKS "grpc.enable_deadline_checking"
184 
185 #define GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER \
186  "grpc.http2.initial_sequence_number"
187 
191 #define GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES "grpc.http2.lookahead_bytes"
192 
193 #define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER \
194  "grpc.http2.hpack_table_size.decoder"
195 
196 #define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \
197  "grpc.http2.hpack_table_size.encoder"
198 
201 #define GRPC_ARG_HTTP2_MAX_FRAME_SIZE "grpc.http2.max_frame_size"
202 
203 #define GRPC_ARG_HTTP2_BDP_PROBE "grpc.http2.bdp_probe"
204 
213 #define GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS \
214  "grpc.http2.min_time_between_pings_ms"
215 
218 #define GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS \
219  "grpc.http2.min_ping_interval_without_data_ms"
220 
221 #define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme"
222 
225 #define GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA \
226  "grpc.http2.max_pings_without_data"
227 
230 #define GRPC_ARG_HTTP2_MAX_PING_STRIKES "grpc.http2.max_ping_strikes"
231 
233 #define GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE "grpc.http2.write_buffer_size"
234 
236 #define GRPC_ARG_HTTP2_ENABLE_TRUE_BINARY "grpc.http2.true_binary"
237 
239 #define GRPC_ARG_KEEPALIVE_TIME_MS "grpc.keepalive_time_ms"
240 
243 #define GRPC_ARG_KEEPALIVE_TIMEOUT_MS "grpc.keepalive_timeout_ms"
244 
246 #define GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS \
247  "grpc.keepalive_permit_without_calls"
248 
250 #define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority"
251 
253 #define GRPC_ARG_PRIMARY_USER_AGENT_STRING "grpc.primary_user_agent"
254 
256 #define GRPC_ARG_SECONDARY_USER_AGENT_STRING "grpc.secondary_user_agent"
257 
258 #define GRPC_ARG_MIN_RECONNECT_BACKOFF_MS "grpc.min_reconnect_backoff_ms"
259 
260 #define GRPC_ARG_MAX_RECONNECT_BACKOFF_MS "grpc.max_reconnect_backoff_ms"
261 
262 #define GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS \
263  "grpc.initial_reconnect_backoff_ms"
264 
265 #define GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS \
266  "grpc.dns_min_time_between_resolutions_ms"
267 
269 #define GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS "grpc.server_handshake_timeout_ms"
270 
277 #define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override"
278 
281 #define GRPC_SSL_SESSION_CACHE_ARG "grpc.ssl_session_cache"
282 
289 #define GRPC_ARG_TSI_MAX_FRAME_SIZE "grpc.tsi.max_frame_size"
290 
292 #define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size"
293 
294 #define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport"
295 
298 #define GRPC_ARG_RESOURCE_QUOTA "grpc.resource_quota"
299 
300 #define GRPC_ARG_EXPAND_WILDCARD_ADDRS "grpc.expand_wildcard_addrs"
301 
303 #define GRPC_ARG_SERVICE_CONFIG "grpc.service_config"
304 
305 #define GRPC_ARG_SERVICE_CONFIG_DISABLE_RESOLUTION \
306  "grpc.service_config_disable_resolution"
307 
308 #define GRPC_ARG_LB_POLICY_NAME "grpc.lb_policy_name"
309 
310 #define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator"
311 
312 #define GRPC_ARG_SOCKET_FACTORY "grpc.socket_factory"
313 
317 #define GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE \
318  "grpc.max_channel_trace_event_memory_per_node"
319 
322 #define GRPC_ARG_ENABLE_CHANNELZ "grpc.enable_channelz"
323 
325 #define GRPC_ARG_USE_CRONET_PACKET_COALESCING \
326  "grpc.use_cronet_packet_coalescing"
327 
329 #define GRPC_ARG_TCP_READ_CHUNK_SIZE "grpc.experimental.tcp_read_chunk_size"
330 
333 #define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
334 #define GRPC_ARG_TCP_MIN_READ_CHUNK_SIZE \
335  "grpc.experimental.tcp_min_read_chunk_size"
336 #define GRPC_ARG_TCP_MAX_READ_CHUNK_SIZE \
337  "grpc.experimental.tcp_max_read_chunk_size"
338 /* TCP TX Zerocopy enable state: zero is disabled, non-zero is enabled. By
339  default, it is disabled. */
340 #define GRPC_ARG_TCP_TX_ZEROCOPY_ENABLED \
341  "grpc.experimental.tcp_tx_zerocopy_enabled"
342 /* TCP TX Zerocopy send threshold: only zerocopy if >= this many bytes sent. By
343  default, this is set to 16KB. */
344 #define GRPC_ARG_TCP_TX_ZEROCOPY_SEND_BYTES_THRESHOLD \
345  "grpc.experimental.tcp_tx_zerocopy_send_bytes_threshold"
346 /* TCP TX Zerocopy max simultaneous sends: limit for maximum number of pending
347  calls to tcp_write() using zerocopy. A tcp_write() is considered pending
348  until the kernel performs the zerocopy-done callback for all sendmsg() calls
349  issued by the tcp_write(). By default, this is set to 4. */
350 #define GRPC_ARG_TCP_TX_ZEROCOPY_MAX_SIMULT_SENDS \
351  "grpc.experimental.tcp_tx_zerocopy_max_simultaneous_sends"
352 /* Timeout in milliseconds to use for calls to the grpclb load balancer.
353  If 0 or unset, the balancer calls will have no deadline. */
354 #define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_call_timeout_ms"
355 /* Specifies the xDS bootstrap config as a JSON string.
356  FOR TESTING PURPOSES ONLY -- DO NOT USE IN PRODUCTION.
357  This option allows controlling the bootstrap configuration on a
358  per-channel basis, which is useful in tests. However, this results
359  in having a separate xDS client instance per channel rather than
360  using the global instance, which is not the intended way to use xDS.
361  Currently, this will (a) add unnecessary load on the xDS server and
362  (b) break use of CSDS, and there may be additional side effects in
363  the future. */
364 #define GRPC_ARG_TEST_ONLY_DO_NOT_USE_IN_PROD_XDS_BOOTSTRAP_CONFIG \
365  "grpc.TEST_ONLY_DO_NOT_USE_IN_PROD.xds_bootstrap_config"
366 /* Timeout in milliseconds to wait for the serverlist from the grpclb load
367  balancer before using fallback backend addresses from the resolver.
368  If 0, enter fallback mode immediately. Default value is 10000. */
369 #define GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS "grpc.grpclb_fallback_timeout_ms"
370 /* Timeout in milliseconds to wait for the child of a specific priority to
371  complete its initial connection attempt before the priority LB policy fails
372  over to the next priority. Default value is 10 seconds. */
373 #define GRPC_ARG_PRIORITY_FAILOVER_TIMEOUT_MS \
374  "grpc.priority_failover_timeout_ms"
375 
376 #define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION \
377  "grpc.workaround.cronet_compression"
378 
385 #define GRPC_ARG_OPTIMIZATION_TARGET "grpc.optimization_target"
386 
395 #define GRPC_ARG_ENABLE_RETRIES "grpc.enable_retries"
396 
404 #define GRPC_ARG_EXPERIMENTAL_ENABLE_HEDGING "grpc.experimental.enable_hedging"
405 
406 #define GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE "grpc.per_rpc_retry_buffer_size"
407 
409 #define GRPC_ARG_MOBILE_LOG_CONTEXT "grpc.mobile_log_context"
410 
411 #define GRPC_ARG_DISABLE_CLIENT_AUTHORITY_FILTER \
412  "grpc.disable_client_authority_filter"
413 
414 #define GRPC_ARG_ENABLE_HTTP_PROXY "grpc.enable_http_proxy"
415 
417 #define GRPC_ARG_HTTP_PROXY "grpc.http_proxy"
418 
420 #define GRPC_ARG_SURFACE_USER_AGENT "grpc.surface_user_agent"
421 
423 #define GRPC_ARG_INHIBIT_HEALTH_CHECKING "grpc.inhibit_health_checking"
424 
432 #define GRPC_ARG_DNS_ENABLE_SRV_QUERIES "grpc.dns_enable_srv_queries"
433 
439 #define GRPC_ARG_DNS_ARES_QUERY_TIMEOUT_MS "grpc.dns_ares_query_timeout"
440 
442 #define GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL "grpc.use_local_subchannel_pool"
443 
444 #define GRPC_ARG_CHANNEL_POOL_DOMAIN "grpc.channel_pooling_domain"
445 
446 #define GRPC_ARG_CHANNEL_ID "grpc.channel_id"
447 
449 #define GRPC_ARG_AUTHORIZATION_POLICY_PROVIDER \
450  "grpc.authorization_policy_provider"
451 
455 #define GRPC_ARG_SERVER_CONFIG_CHANGE_DRAIN_GRACE_TIME_MS \
456  "grpc.experimental.server_config_change_drain_grace_time_ms"
457 
463 typedef enum grpc_call_error {
499 
502 #define GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH (-1)
503 #define GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH (4 * 1024 * 1024)
504 
509 #define GRPC_WRITE_BUFFER_HINT (0x00000001u)
510 
512 #define GRPC_WRITE_NO_COMPRESS (0x00000002u)
513 
514 #define GRPC_WRITE_THROUGH (0x00000004u)
515 
516 #define GRPC_WRITE_USED_MASK \
517  (GRPC_WRITE_BUFFER_HINT | GRPC_WRITE_NO_COMPRESS | GRPC_WRITE_THROUGH)
518 
522 #define GRPC_INITIAL_METADATA_WAIT_FOR_READY (0x00000020u)
523 
525 #define GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET (0x00000080u)
526 
527 #define GRPC_INITIAL_METADATA_CORKED (0x00000100u)
528 
530 #define GRPC_INITIAL_METADATA_USED_MASK \
531  (GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET | \
532  GRPC_INITIAL_METADATA_WAIT_FOR_READY | GRPC_INITIAL_METADATA_CORKED | \
533  GRPC_WRITE_THROUGH)
534 
536 typedef struct grpc_metadata {
541 
545  struct /* internal */ {
546  void* obfuscated[4];
547  } internal_data;
548 } grpc_metadata;
549 
551 typedef enum grpc_completion_type {
559 
563 typedef struct grpc_event {
571  int success;
575  void* tag;
576 } grpc_event;
577 
578 typedef struct {
579  size_t count;
580  size_t capacity;
583 
584 typedef struct {
588  uint32_t flags;
589  void* reserved;
591 
592 typedef enum {
633 } grpc_op_type;
634 
635 struct grpc_byte_buffer;
636 
639 typedef struct grpc_op {
643  uint32_t flags;
645  void* reserved;
646  union grpc_op_data {
648  struct /* internal */ {
649  void* reserved[8];
650  } reserved;
652  size_t count;
657  uint8_t is_set;
668  } send_message;
693  } recv_message;
706  const char** error_string;
713  int* cancelled;
715  } data;
716 } grpc_op;
717 
719 typedef struct {
727 
729 
739 typedef enum {
743 
748 
755 
757 typedef enum {
760 
763 
767 
778 
782 
787 
788 #define GRPC_CQ_CURRENT_VERSION 2
789 #define GRPC_CQ_VERSION_MINIMUM_FOR_CALLBACKABLE 2
793  int version;
796 
798 
799  /* END OF VERSION 1 CQ ATTRIBUTES */
800 
801  /* START OF VERSION 2 CQ ATTRIBUTES */
805 
806  /* END OF VERSION 2 CQ ATTRIBUTES */
808 
811 
812 #ifdef __cplusplus
813 }
814 #endif
815 
816 #endif /* GRPC_IMPL_CODEGEN_GRPC_TYPES_H */
grpc_arg
A single argument...
Definition: grpc_types.h:102
grpc_op::grpc_op_data::grpc_op_send_message::send_message
struct grpc_byte_buffer * send_message
This op takes ownership of the slices in send_message.
Definition: grpc_types.h:667
grpc_op::flags
uint32_t flags
Write flags bitset for grpc_begin_messages.
Definition: grpc_types.h:643
grpc_call_error
grpc_call_error
Result of a grpc call.
Definition: grpc_types.h:463
GRPC_CALL_ERROR_ALREADY_INVOKED
@ GRPC_CALL_ERROR_ALREADY_INVOKED
this method must be called before invoke
Definition: grpc_types.h:475
grpc_metadata_array::metadata
grpc_metadata * metadata
Definition: grpc_types.h:581
grpc_op::grpc_op_data::grpc_op_recv_status_on_client::trailing_metadata
grpc_metadata_array * trailing_metadata
ownership of the array is with the caller, but ownership of the elements stays with the call object (...
Definition: grpc_types.h:700
grpc_completion_type
grpc_completion_type
The type of completion (for grpc_event)
Definition: grpc_types.h:551
grpc_op::grpc_op_data::grpc_op_send_initial_metadata
Definition: grpc_types.h:651
grpc_metadata
struct grpc_metadata grpc_metadata
A single metadata element.
grpc_op::grpc_op_data::grpc_op_recv_status_on_client::status
grpc_status_code * status
Definition: grpc_types.h:701
grpc_arg_type
grpc_arg_type
Type specifier for grpc_arg.
Definition: grpc_types.h:78
status.h
GRPC_CALL_ERROR_TOO_MANY_OPERATIONS
@ GRPC_CALL_ERROR_TOO_MANY_OPERATIONS
there is already an outstanding read/write operation on the call
Definition: grpc_types.h:482
GRPC_ARG_INTEGER
@ GRPC_ARG_INTEGER
Definition: grpc_types.h:80
GRPC_CQ_NEXT
@ GRPC_CQ_NEXT
Events are popped out by calling grpc_completion_queue_next() API ONLY.
Definition: grpc_types.h:759
grpc_op::grpc_op_data::grpc_op_send_initial_metadata::grpc_op_send_initial_metadata_maybe_compression_level
If is_set, compression_level will be used for the call.
Definition: grpc_types.h:656
grpc_status_code
grpc_status_code
Definition: status.h:28
grpc_op::grpc_op_data::grpc_op_send_status_from_server
Definition: grpc_types.h:669
grpc_socket_mutator
struct grpc_socket_mutator grpc_socket_mutator
The Socket Mutator interface allows changes on socket options.
Definition: grpc_types.h:72
grpc_call_details::flags
uint32_t flags
Definition: grpc_types.h:588
grpc_resource_quota
struct grpc_resource_quota grpc_resource_quota
Definition: grpc_types.h:728
GRPC_CALL_ERROR
@ GRPC_CALL_ERROR
something failed, we don't know what
Definition: grpc_types.h:467
GRPC_CALL_ERROR_INVALID_MESSAGE
@ GRPC_CALL_ERROR_INVALID_MESSAGE
invalid message was passed to this call
Definition: grpc_types.h:488
grpc_op::grpc_op_data::grpc_op_send_initial_metadata::grpc_op_send_initial_metadata_maybe_compression_level::level
grpc_compression_level level
Definition: grpc_types.h:658
GRPC_ARG_STRING
@ GRPC_ARG_STRING
Definition: grpc_types.h:79
grpc_cq_polling_type
grpc_cq_polling_type
Completion queues internally MAY maintain a set of file descriptors in a structure called 'pollset'.
Definition: grpc_types.h:739
grpc_op::grpc_op_data::send_initial_metadata
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata send_initial_metadata
grpc_byte_buffer
struct grpc_byte_buffer grpc_byte_buffer
grpc_completion_queue_functor::internal_success
int internal_success
The following fields are not API.
Definition: grpc_types.h:784
grpc_op
struct grpc_op grpc_op
Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments)
grpc_metadata_array
Definition: grpc_types.h:578
grpc_byte_buffer::grpc_byte_buffer_data::raw
struct grpc_byte_buffer::grpc_byte_buffer_data::grpc_compressed_buffer raw
grpc_call_details
Definition: grpc_types.h:584
grpc_op::reserved
void * reserved
Reserved for future usage.
Definition: grpc_types.h:645
grpc_compression_algorithm
grpc_compression_algorithm
The various compression algorithms supported by gRPC (not sorted by compression level)
Definition: compression_types.h:59
grpc_cq_completion_type
grpc_cq_completion_type
Specifies the type of APIs to use to pop events from the completion queue.
Definition: grpc_types.h:757
GRPC_CALL_ERROR_NOT_ON_CLIENT
@ GRPC_CALL_ERROR_NOT_ON_CLIENT
this method is not available on the client
Definition: grpc_types.h:471
grpc_op::grpc_op_data::grpc_op_send_message
Definition: grpc_types.h:661
grpc_byte_buffer::grpc_byte_buffer_data
Definition: grpc_types.h:45
GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN
@ GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN
completion queue has been shutdown
Definition: grpc_types.h:497
GRPC_QUEUE_SHUTDOWN
@ GRPC_QUEUE_SHUTDOWN
Shutting down.
Definition: grpc_types.h:553
grpc_byte_buffer::reserved
void * reserved
Definition: grpc_types.h:43
GRPC_OP_COMPLETE
@ GRPC_OP_COMPLETE
Operation completion.
Definition: grpc_types.h:557
GRPC_CALL_OK
@ GRPC_CALL_OK
everything went ok
Definition: grpc_types.h:465
grpc_event
struct grpc_event grpc_event
The result of an operation.
grpc_metadata_array::count
size_t count
Definition: grpc_types.h:579
grpc_call_details::method
grpc_slice method
Definition: grpc_types.h:585
GRPC_CALL_ERROR_INVALID_METADATA
@ GRPC_CALL_ERROR_INVALID_METADATA
invalid metadata was passed to this call
Definition: grpc_types.h:486
GRPC_CALL_ERROR_NOT_ON_SERVER
@ GRPC_CALL_ERROR_NOT_ON_SERVER
this method is not available on the server
Definition: grpc_types.h:469
grpc_metadata_array::capacity
size_t capacity
Definition: grpc_types.h:580
grpc_arg_pointer_vtable
Definition: grpc_types.h:84
grpc_channel_args
An array of arguments that can be passed around.
Definition: grpc_types.h:131
grpc_op::grpc_op_data::recv_message
struct grpc_op::grpc_op_data::grpc_op_recv_message recv_message
GRPC_BB_RAW
@ GRPC_BB_RAW
Future types may include GRPC_BB_PROTOBUF, etc.
Definition: grpc_types.h:38
GRPC_CQ_NON_POLLING
@ GRPC_CQ_NON_POLLING
The completion queue will not have an associated pollset.
Definition: grpc_types.h:753
grpc_op::data
union grpc_op::grpc_op_data data
grpc_metadata::obfuscated
void * obfuscated[4]
Definition: grpc_types.h:546
grpc_op::grpc_op_data::grpc_op_recv_status_on_client
Definition: grpc_types.h:694
grpc_byte_buffer::type
grpc_byte_buffer_type type
Definition: grpc_types.h:44
grpc_completion_queue_functor
struct grpc_completion_queue_functor grpc_completion_queue_functor
Specifies an interface class to be used as a tag for callback-based completion queues.
grpc_op::grpc_op_data::grpc_op_recv_message::recv_message
struct grpc_byte_buffer ** recv_message
Definition: grpc_types.h:692
grpc_metadata
A single metadata element.
Definition: grpc_types.h:536
GRPC_CQ_DEFAULT_POLLING
@ GRPC_CQ_DEFAULT_POLLING
The completion queue will have an associated pollset and there is no restriction on the type of file ...
Definition: grpc_types.h:742
GRPC_OP_RECV_INITIAL_METADATA
@ GRPC_OP_RECV_INITIAL_METADATA
Receive initial metadata: one and only one MUST be made on the client, must not be made on the server...
Definition: grpc_types.h:616
grpc_arg::grpc_arg_value::string
char * string
Definition: grpc_types.h:106
grpc_metadata::internal_data
struct grpc_metadata::@1 internal_data
The following fields are reserved for grpc internal use.
grpc_completion_queue_functor::functor_run
void(* functor_run)(struct grpc_completion_queue_functor *, int)
The run member specifies a function that will be called when this tag is extracted from the completio...
Definition: grpc_types.h:777
GRPC_CALL_ERROR_NOT_INVOKED
@ GRPC_CALL_ERROR_NOT_INVOKED
this method must be called after invoke
Definition: grpc_types.h:477
GRPC_CQ_NON_LISTENING
@ GRPC_CQ_NON_LISTENING
Similar to GRPC_CQ_DEFAULT_POLLING except that the completion queues will not contain any 'listening ...
Definition: grpc_types.h:747
GRPC_OP_SEND_STATUS_FROM_SERVER
@ GRPC_OP_SEND_STATUS_FROM_SERVER
Send status from the server: one and only one instance MUST be sent from the server unless the call w...
Definition: grpc_types.h:611
grpc_arg::grpc_arg_value::grpc_arg_pointer::vtable
const grpc_arg_pointer_vtable * vtable
Definition: grpc_types.h:110
GRPC_CALL_ERROR_INVALID_FLAGS
@ GRPC_CALL_ERROR_INVALID_FLAGS
the flags value was illegal for this call
Definition: grpc_types.h:484
grpc_op::grpc_op_data::grpc_op_send_status_from_server::status
grpc_status_code status
Definition: grpc_types.h:672
grpc_op::grpc_op_data::reserved
void * reserved[8]
Definition: grpc_types.h:649
grpc_arg::grpc_arg_value::grpc_arg_pointer
Definition: grpc_types.h:108
grpc_op::grpc_op_data::grpc_op_recv_status_on_client::error_string
const char ** error_string
If this is not nullptr, it will be populated with the full fidelity error string for debugging purpos...
Definition: grpc_types.h:706
grpc_event
The result of an operation.
Definition: grpc_types.h:563
grpc_op_type
grpc_op_type
Definition: grpc_types.h:592
grpc_metadata::value
grpc_slice value
Definition: grpc_types.h:540
grpc_call
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:69
grpc_byte_buffer
Definition: grpc_types.h:42
grpc_op
Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments)
Definition: grpc_types.h:639
GRPC_OP_SEND_MESSAGE
@ GRPC_OP_SEND_MESSAGE
Send a message: 0 or more of these operations can occur for each call.
Definition: grpc_types.h:601
grpc_channel_args::num_args
size_t num_args
Definition: grpc_types.h:132
grpc_completion_queue_functor::internal_next
struct grpc_completion_queue_functor * internal_next
Definition: grpc_types.h:785
grpc_op::grpc_op_data::grpc_op_recv_close_on_server
Definition: grpc_types.h:708
grpc_op::grpc_op_data::grpc_op_send_status_from_server::trailing_metadata
grpc_metadata * trailing_metadata
Definition: grpc_types.h:671
grpc_slice
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice.h:65
grpc_arg::grpc_arg_value::grpc_arg_pointer::p
void * p
Definition: grpc_types.h:109
grpc_socket_factory
struct grpc_socket_factory grpc_socket_factory
The Socket Factory interface creates and binds sockets.
Definition: grpc_types.h:75
grpc_server
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc_types.h:64
grpc_op::grpc_op_data::grpc_op_recv_initial_metadata
ownership of the array is with the caller, but ownership of the elements stays with the call object (...
Definition: grpc_types.h:683
grpc_arg_pointer_vtable
struct grpc_arg_pointer_vtable grpc_arg_pointer_vtable
grpc_arg_pointer_vtable::destroy
void(* destroy)(void *p)
Definition: grpc_types.h:86
GRPC_CQ_PLUCK
@ GRPC_CQ_PLUCK
Events are popped out by calling grpc_completion_queue_pluck() API ONLY.
Definition: grpc_types.h:762
grpc_completion_queue_attributes
Definition: grpc_types.h:790
grpc_completion_queue_attributes::version
int version
The version number of this structure.
Definition: grpc_types.h:793
grpc_op::op
grpc_op_type op
Operation type, as defined by grpc_op_type.
Definition: grpc_types.h:641
grpc_op::grpc_op_data::grpc_op_send_initial_metadata::count
size_t count
Definition: grpc_types.h:652
gpr_types.h
grpc_op::grpc_op_data::grpc_op_recv_status_on_client::status_details
grpc_slice * status_details
Definition: grpc_types.h:702
grpc_byte_buffer::data
union grpc_byte_buffer::grpc_byte_buffer_data data
compression_types.h
grpc_completion_queue_factory
struct grpc_completion_queue_factory grpc_completion_queue_factory
The completion queue factory structure is opaque to the callers of grpc.
Definition: grpc_types.h:810
grpc_op::grpc_op_data::recv_close_on_server
struct grpc_op::grpc_op_data::grpc_op_recv_close_on_server recv_close_on_server
GRPC_OP_RECV_MESSAGE
@ GRPC_OP_RECV_MESSAGE
Receive a message: 0 or more of these operations can occur for each call.
Definition: grpc_types.h:620
GRPC_CALL_ERROR_ALREADY_ACCEPTED
@ GRPC_CALL_ERROR_ALREADY_ACCEPTED
this method must be called before server_accept
Definition: grpc_types.h:473
grpc_completion_queue_attributes::cq_shutdown_cb
grpc_completion_queue_functor * cq_shutdown_cb
When creating a callbackable CQ, pass in a functor to get invoked when shutdown is complete.
Definition: grpc_types.h:804
grpc_channel_info::service_config_json
char ** service_config_json
If non-NULL, will be set to point to a string containing the service config used by the channel in JS...
Definition: grpc_types.h:725
grpc_op::grpc_op_data::send_status_from_server
struct grpc_op::grpc_op_data::grpc_op_send_status_from_server send_status_from_server
GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH
@ GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH
payload type requested is not the type registered
Definition: grpc_types.h:495
grpc_call_details::host
grpc_slice host
Definition: grpc_types.h:586
GRPC_OP_SEND_INITIAL_METADATA
@ GRPC_OP_SEND_INITIAL_METADATA
Send initial metadata: one and only one instance MUST be sent for each call, unless the call was canc...
Definition: grpc_types.h:597
grpc_channel_info::lb_policy_name
char ** lb_policy_name
If non-NULL, will be set to point to a string indicating the LB policy name.
Definition: grpc_types.h:722
grpc_op::grpc_op_data::send_message
struct grpc_op::grpc_op_data::grpc_op_send_message send_message
grpc_byte_buffer::grpc_byte_buffer_data::grpc_compressed_buffer::compression
grpc_compression_algorithm compression
Definition: grpc_types.h:50
port_platform.h
grpc_byte_buffer_type
grpc_byte_buffer_type
Definition: grpc_types.h:37
grpc_op::grpc_op_data::grpc_op_send_initial_metadata::metadata
grpc_metadata * metadata
Definition: grpc_types.h:653
GRPC_CALL_ERROR_BATCH_TOO_BIG
@ GRPC_CALL_ERROR_BATCH_TOO_BIG
this batch of operations leads to more operations than allowed
Definition: grpc_types.h:493
grpc_op::grpc_op_data::recv_status_on_client
struct grpc_op::grpc_op_data::grpc_op_recv_status_on_client recv_status_on_client
grpc_compression_level
grpc_compression_level
Compression levels allow a party with knowledge of its peer's accepted encodings to request compressi...
Definition: compression_types.h:71
grpc_op::grpc_op_data::grpc_op_send_status_from_server::trailing_metadata_count
size_t trailing_metadata_count
Definition: grpc_types.h:670
grpc_op::grpc_op_data::grpc_op_send_initial_metadata::maybe_compression_level
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata::grpc_op_send_initial_metadata_maybe_compression_level maybe_compression_level
grpc_arg::key
char * key
Definition: grpc_types.h:104
grpc_op::grpc_op_data
Definition: grpc_types.h:646
grpc_byte_buffer::grpc_byte_buffer_data::grpc_compressed_buffer
Definition: grpc_types.h:49
grpc_completion_queue
struct grpc_completion_queue grpc_completion_queue
Completion Queues enable notification of the completion of asynchronous actions.
Definition: grpc_types.h:58
grpc_op::grpc_op_data::grpc_op_recv_message
ownership of the byte buffer is moved to the caller; the caller must call grpc_byte_buffer_destroy on...
Definition: grpc_types.h:691
grpc_completion_queue_functor
Specifies an interface class to be used as a tag for callback-based completion queues.
Definition: grpc_types.h:772
grpc_op::grpc_op_data::grpc_op_send_initial_metadata::grpc_op_send_initial_metadata_maybe_compression_level::is_set
uint8_t is_set
Definition: grpc_types.h:657
grpc_completion_queue_attributes::cq_completion_type
grpc_cq_completion_type cq_completion_type
Set to GRPC_CQ_CURRENT_VERSION.
Definition: grpc_types.h:795
grpc_channel
struct grpc_channel grpc_channel
The Channel interface allows creation of Call objects.
Definition: grpc_types.h:61
grpc_byte_buffer::grpc_byte_buffer_data::grpc_compressed_buffer::slice_buffer
grpc_slice_buffer slice_buffer
Definition: grpc_types.h:51
GRPC_OP_RECV_CLOSE_ON_SERVER
@ GRPC_OP_RECV_CLOSE_ON_SERVER
Receive close on the server: one and only one must be made on the server.
Definition: grpc_types.h:632
grpc_completion_queue_attributes
struct grpc_completion_queue_attributes grpc_completion_queue_attributes
GRPC_CALL_ERROR_ALREADY_FINISHED
@ GRPC_CALL_ERROR_ALREADY_FINISHED
this call is already finished (writes_done or write_status has already been called)
Definition: grpc_types.h:480
grpc_completion_queue_attributes::cq_polling_type
grpc_cq_polling_type cq_polling_type
Definition: grpc_types.h:797
grpc_slice_buffer
Represents an expandable array of slices, to be interpreted as a single item.
Definition: slice.h:83
grpc_op::grpc_op_data::recv_initial_metadata
struct grpc_op::grpc_op_data::grpc_op_recv_initial_metadata recv_initial_metadata
GRPC_ARG_POINTER
@ GRPC_ARG_POINTER
Definition: grpc_types.h:81
grpc_op::grpc_op_data::grpc_op_send_status_from_server::status_details
grpc_slice * status_details
optional: set to NULL if no details need sending, non-NULL if they do pointer will not be retained pa...
Definition: grpc_types.h:676
GRPC_CQ_CALLBACK
@ GRPC_CQ_CALLBACK
Events trigger a callback specified as the tag.
Definition: grpc_types.h:765
gpr_timespec
Analogous to struct timespec.
Definition: gpr_types.h:49
grpc_event::type
grpc_completion_type type
The type of the completion.
Definition: grpc_types.h:565
grpc_arg::grpc_arg_value::integer
int integer
Definition: grpc_types.h:107
grpc_byte_buffer::grpc_byte_buffer_data::reserved
void * reserved[8]
Definition: grpc_types.h:47
GRPC_OP_RECV_STATUS_ON_CLIENT
@ GRPC_OP_RECV_STATUS_ON_CLIENT
Receive status on the client: one and only one must be made on the client.
Definition: grpc_types.h:626
grpc_op::grpc_op_data::grpc_op_recv_initial_metadata::recv_initial_metadata
grpc_metadata_array * recv_initial_metadata
Definition: grpc_types.h:684
grpc_arg::type
grpc_arg_type type
Definition: grpc_types.h:103
grpc_arg_pointer_vtable::cmp
int(* cmp)(void *p, void *q)
Definition: grpc_types.h:87
grpc_channel_info
Information requested from the channel.
Definition: grpc_types.h:719
grpc_channel_args::args
grpc_arg * args
Definition: grpc_types.h:133
grpc_call_details::deadline
gpr_timespec deadline
Definition: grpc_types.h:587
grpc_event::success
int success
If the grpc_completion_type is GRPC_OP_COMPLETE, this field indicates whether the operation was succe...
Definition: grpc_types.h:571
GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE
@ GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE
completion queue for notification has not been registered with the server
Definition: grpc_types.h:491
GRPC_QUEUE_TIMEOUT
@ GRPC_QUEUE_TIMEOUT
No event before timeout.
Definition: grpc_types.h:555
grpc_event::tag
void * tag
The tag passed to grpc_call_start_batch etc to start this operation.
Definition: grpc_types.h:575
grpc_op::grpc_op_data::grpc_op_recv_close_on_server::cancelled
int * cancelled
out argument, set to 1 if the call failed at the server for a reason other than a non-OK status (canc...
Definition: grpc_types.h:713
grpc_metadata::key
grpc_slice key
the key, value values are expected to line up with grpc_mdelem: if changing them, update metadata....
Definition: grpc_types.h:539
GRPC_OP_SEND_CLOSE_FROM_CLIENT
@ GRPC_OP_SEND_CLOSE_FROM_CLIENT
Send a close from the client: one and only one instance MUST be sent from the client,...
Definition: grpc_types.h:606
slice.h
grpc_arg::grpc_arg_value
Definition: grpc_types.h:105
grpc_completion_queue_functor::inlineable
int inlineable
The inlineable member specifies whether this functor can be run inline.
Definition: grpc_types.h:781
grpc_call_details::reserved
void * reserved
Definition: grpc_types.h:589