GRPC C++  1.39.1
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 
23 
28 
29 #include <stddef.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 typedef enum {
39 
40 typedef struct grpc_byte_buffer {
41  void* reserved;
44  struct /* internal */ {
45  void* reserved[8];
50  } raw;
51  } data;
53 
57 
59 typedef struct grpc_alarm grpc_alarm;
60 
62 typedef struct grpc_channel grpc_channel;
63 
65 typedef struct grpc_server grpc_server;
66 
70 typedef struct grpc_call grpc_call;
71 
74 
77 
79 typedef enum {
84 
85 typedef struct grpc_arg_pointer_vtable {
86  void* (*copy)(void* p);
87  void (*destroy)(void* p);
88  int (*cmp)(void* p, void* q);
90 
103 typedef struct {
105  char* key;
107  char* string;
108  int integer;
110  void* p;
112  } pointer;
113  } value;
114 } grpc_arg;
115 
132 typedef struct {
133  size_t num_args;
136 
142 #define GRPC_ARG_ENABLE_CENSUS "grpc.census"
144 #define GRPC_ARG_ENABLE_LOAD_REPORTING "grpc.loadreporting"
147 #define GRPC_ARG_MINIMAL_STACK "grpc.minimal_stack"
150 #define GRPC_ARG_MAX_CONCURRENT_STREAMS "grpc.max_concurrent_streams"
153 #define GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH "grpc.max_receive_message_length"
156 #define GRPC_ARG_MAX_MESSAGE_LENGTH GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH
159 #define GRPC_ARG_MAX_SEND_MESSAGE_LENGTH "grpc.max_send_message_length"
163 #define GRPC_ARG_MAX_CONNECTION_IDLE_MS "grpc.max_connection_idle_ms"
166 #define GRPC_ARG_MAX_CONNECTION_AGE_MS "grpc.max_connection_age_ms"
169 #define GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS "grpc.max_connection_age_grace_ms"
173 #define GRPC_ARG_CLIENT_IDLE_TIMEOUT_MS "grpc.client_idle_timeout_ms"
176 #define GRPC_ARG_ENABLE_PER_MESSAGE_COMPRESSION "grpc.per_message_compression"
180 #define GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION \
181  "grpc.per_message_decompression"
184 #define GRPC_ARG_ENABLE_DEADLINE_CHECKS "grpc.enable_deadline_checking"
186 #define GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER \
187  "grpc.http2.initial_sequence_number"
192 #define GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES "grpc.http2.lookahead_bytes"
194 #define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER \
195  "grpc.http2.hpack_table_size.decoder"
197 #define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \
198  "grpc.http2.hpack_table_size.encoder"
202 #define GRPC_ARG_HTTP2_MAX_FRAME_SIZE "grpc.http2.max_frame_size"
204 #define GRPC_ARG_HTTP2_BDP_PROBE "grpc.http2.bdp_probe"
214 #define GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS \
215  "grpc.http2.min_time_between_pings_ms"
219 #define GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS \
220  "grpc.http2.min_ping_interval_without_data_ms"
222 #define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme"
226 #define GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA \
227  "grpc.http2.max_pings_without_data"
231 #define GRPC_ARG_HTTP2_MAX_PING_STRIKES "grpc.http2.max_ping_strikes"
234 #define GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE "grpc.http2.write_buffer_size"
237 #define GRPC_ARG_HTTP2_ENABLE_TRUE_BINARY "grpc.http2.true_binary"
240 #define GRPC_ARG_KEEPALIVE_TIME_MS "grpc.keepalive_time_ms"
244 #define GRPC_ARG_KEEPALIVE_TIMEOUT_MS "grpc.keepalive_timeout_ms"
247 #define GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS \
248  "grpc.keepalive_permit_without_calls"
251 #define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority"
254 #define GRPC_ARG_PRIMARY_USER_AGENT_STRING "grpc.primary_user_agent"
257 #define GRPC_ARG_SECONDARY_USER_AGENT_STRING "grpc.secondary_user_agent"
259 #define GRPC_ARG_MIN_RECONNECT_BACKOFF_MS "grpc.min_reconnect_backoff_ms"
261 #define GRPC_ARG_MAX_RECONNECT_BACKOFF_MS "grpc.max_reconnect_backoff_ms"
263 #define GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS \
264  "grpc.initial_reconnect_backoff_ms"
266 #define GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS \
267  "grpc.dns_min_time_between_resolutions_ms"
270 #define GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS "grpc.server_handshake_timeout_ms"
278 #define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override"
282 #define GRPC_SSL_SESSION_CACHE_ARG "grpc.ssl_session_cache"
290 #define GRPC_ARG_TSI_MAX_FRAME_SIZE "grpc.tsi.max_frame_size"
293 #define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size"
295 #define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport"
299 #define GRPC_ARG_RESOURCE_QUOTA "grpc.resource_quota"
301 #define GRPC_ARG_EXPAND_WILDCARD_ADDRS "grpc.expand_wildcard_addrs"
304 #define GRPC_ARG_SERVICE_CONFIG "grpc.service_config"
306 #define GRPC_ARG_SERVICE_CONFIG_DISABLE_RESOLUTION \
307  "grpc.service_config_disable_resolution"
309 #define GRPC_ARG_LB_POLICY_NAME "grpc.lb_policy_name"
311 #define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator"
313 #define GRPC_ARG_SOCKET_FACTORY "grpc.socket_factory"
318 #define GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE \
319  "grpc.max_channel_trace_event_memory_per_node"
323 #define GRPC_ARG_ENABLE_CHANNELZ "grpc.enable_channelz"
326 #define GRPC_ARG_USE_CRONET_PACKET_COALESCING \
327  "grpc.use_cronet_packet_coalescing"
330 #define GRPC_ARG_TCP_READ_CHUNK_SIZE "grpc.experimental.tcp_read_chunk_size"
334 #define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
335 #define GRPC_ARG_TCP_MIN_READ_CHUNK_SIZE \
336  "grpc.experimental.tcp_min_read_chunk_size"
337 #define GRPC_ARG_TCP_MAX_READ_CHUNK_SIZE \
338  "grpc.experimental.tcp_max_read_chunk_size"
339 /* TCP TX Zerocopy enable state: zero is disabled, non-zero is enabled. By
340  default, it is disabled. */
341 #define GRPC_ARG_TCP_TX_ZEROCOPY_ENABLED \
342  "grpc.experimental.tcp_tx_zerocopy_enabled"
343 /* TCP TX Zerocopy send threshold: only zerocopy if >= this many bytes sent. By
344  default, this is set to 16KB. */
345 #define GRPC_ARG_TCP_TX_ZEROCOPY_SEND_BYTES_THRESHOLD \
346  "grpc.experimental.tcp_tx_zerocopy_send_bytes_threshold"
347 /* TCP TX Zerocopy max simultaneous sends: limit for maximum number of pending
348  calls to tcp_write() using zerocopy. A tcp_write() is considered pending
349  until the kernel performs the zerocopy-done callback for all sendmsg() calls
350  issued by the tcp_write(). By default, this is set to 4. */
351 #define GRPC_ARG_TCP_TX_ZEROCOPY_MAX_SIMULT_SENDS \
352  "grpc.experimental.tcp_tx_zerocopy_max_simultaneous_sends"
353 /* Timeout in milliseconds to use for calls to the grpclb load balancer.
354  If 0 or unset, the balancer calls will have no deadline. */
355 #define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_call_timeout_ms"
356 /* Specifies the xDS bootstrap config as a JSON string.
357  FOR TESTING PURPOSES ONLY -- DO NOT USE IN PRODUCTION.
358  This option allows controlling the bootstrap configuration on a
359  per-channel basis, which is useful in tests. However, this results
360  in having a separate xDS client instance per channel rather than
361  using the global instance, which is not the intended way to use xDS.
362  Currently, this will (a) add unnecessary load on the xDS server and
363  (b) break use of CSDS, and there may be additional side effects in
364  the future. */
365 #define GRPC_ARG_TEST_ONLY_DO_NOT_USE_IN_PROD_XDS_BOOTSTRAP_CONFIG \
366  "grpc.TEST_ONLY_DO_NOT_USE_IN_PROD.xds_bootstrap_config"
367 /* Timeout in milliseconds to wait for the serverlist from the grpclb load
368  balancer before using fallback backend addresses from the resolver.
369  If 0, enter fallback mode immediately. Default value is 10000. */
370 #define GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS "grpc.grpclb_fallback_timeout_ms"
371 /* Timeout in milliseconds to wait for the child of a specific priority to
372  complete its initial connection attempt before the priority LB policy fails
373  over to the next priority. Default value is 10 seconds. */
374 #define GRPC_ARG_PRIORITY_FAILOVER_TIMEOUT_MS \
375  "grpc.priority_failover_timeout_ms"
377 #define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION \
378  "grpc.workaround.cronet_compression"
386 #define GRPC_ARG_OPTIMIZATION_TARGET "grpc.optimization_target"
392 #define GRPC_ARG_ENABLE_RETRIES "grpc.enable_retries"
394 #define GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE "grpc.per_rpc_retry_buffer_size"
397 #define GRPC_ARG_MOBILE_LOG_CONTEXT "grpc.mobile_log_context"
399 #define GRPC_ARG_DISABLE_CLIENT_AUTHORITY_FILTER \
400  "grpc.disable_client_authority_filter"
402 #define GRPC_ARG_ENABLE_HTTP_PROXY "grpc.enable_http_proxy"
405 #define GRPC_ARG_HTTP_PROXY "grpc.http_proxy"
408 #define GRPC_ARG_SURFACE_USER_AGENT "grpc.surface_user_agent"
411 #define GRPC_ARG_INHIBIT_HEALTH_CHECKING "grpc.inhibit_health_checking"
416 #define GRPC_ARG_DNS_ENABLE_SRV_QUERIES "grpc.dns_enable_srv_queries"
423 #define GRPC_ARG_DNS_ARES_QUERY_TIMEOUT_MS "grpc.dns_ares_query_timeout"
426 #define GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL "grpc.use_local_subchannel_pool"
428 #define GRPC_ARG_CHANNEL_POOL_DOMAIN "grpc.channel_pooling_domain"
430 #define GRPC_ARG_CHANNEL_ID "grpc.channel_id"
433 #define GRPC_ARG_AUTHORIZATION_POLICY_PROVIDER \
434  "grpc.authorization_policy_provider"
441 typedef enum grpc_call_error {
477 
480 #define GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH (-1)
481 #define GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH (4 * 1024 * 1024)
482 
487 #define GRPC_WRITE_BUFFER_HINT (0x00000001u)
490 #define GRPC_WRITE_NO_COMPRESS (0x00000002u)
492 #define GRPC_WRITE_THROUGH (0x00000004u)
494 #define GRPC_WRITE_USED_MASK \
495  (GRPC_WRITE_BUFFER_HINT | GRPC_WRITE_NO_COMPRESS | GRPC_WRITE_THROUGH)
496 
499 #define GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST (0x00000010u)
501 #define GRPC_INITIAL_METADATA_WAIT_FOR_READY (0x00000020u)
503 #define GRPC_INITIAL_METADATA_CACHEABLE_REQUEST (0x00000040u)
506 #define GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET (0x00000080u)
508 #define GRPC_INITIAL_METADATA_CORKED (0x00000100u)
509 
511 #define GRPC_INITIAL_METADATA_USED_MASK \
512  (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \
513  GRPC_INITIAL_METADATA_WAIT_FOR_READY | \
514  GRPC_INITIAL_METADATA_CACHEABLE_REQUEST | \
515  GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET | \
516  GRPC_INITIAL_METADATA_CORKED | GRPC_WRITE_THROUGH)
517 
519 typedef struct grpc_metadata {
524 
525  uint32_t flags;
526 
530  struct /* internal */ {
531  void* obfuscated[4];
534 
536 typedef enum grpc_completion_type {
544 
548 typedef struct grpc_event {
556  int success;
560  void* tag;
562 
563 typedef struct {
564  size_t count;
565  size_t capacity;
568 
569 typedef struct {
573  uint32_t flags;
574  void* reserved;
576 
577 typedef enum {
619 
620 struct grpc_byte_buffer;
621 
624 typedef struct grpc_op {
628  uint32_t flags;
630  void* reserved;
631  union grpc_op_data {
633  struct /* internal */ {
634  void* reserved[8];
637  size_t count;
642  uint8_t is_set;
691  const char** error_string;
698  int* cancelled;
700  } data;
702 
704 typedef struct {
712 
714 
724 typedef enum {
728 
733 
740 
742 typedef enum {
745 
748 
752 
763 
767 
772 
775 
776 #define GRPC_CQ_CURRENT_VERSION 2
777 #define GRPC_CQ_VERSION_MINIMUM_FOR_CALLBACKABLE 2
781  int version;
784 
786 
787  /* END OF VERSION 1 CQ ATTRIBUTES */
788 
789  /* START OF VERSION 2 CQ ATTRIBUTES */
793 
794  /* END OF VERSION 2 CQ ATTRIBUTES */
796 
799 
800 #ifdef __cplusplus
801 }
802 #endif
803 
804 #endif /* GRPC_IMPL_CODEGEN_GRPC_TYPES_H */
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_compression_algorithm
The various compression algorithms supported by gRPC (not sorted by compression level)
Definition: compression_types.h:57
grpc_status_code
Definition: status.h:26
struct grpc_op grpc_op
Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments)
struct grpc_alarm grpc_alarm
An alarm associated with a completion queue.
Definition: grpc_types.h:59
grpc_arg_type
Type specifier for grpc_arg.
Definition: grpc_types.h:79
@ GRPC_ARG_POINTER
Definition: grpc_types.h:82
@ GRPC_ARG_STRING
Definition: grpc_types.h:80
@ GRPC_ARG_INTEGER
Definition: grpc_types.h:81
grpc_call_error
Result of a grpc call.
Definition: grpc_types.h:441
@ GRPC_CALL_ERROR_ALREADY_INVOKED
this method must be called before invoke
Definition: grpc_types.h:453
@ GRPC_CALL_ERROR_INVALID_METADATA
invalid metadata was passed to this call
Definition: grpc_types.h:464
@ GRPC_CALL_ERROR_NOT_ON_SERVER
this method is not available on the server
Definition: grpc_types.h:447
@ GRPC_CALL_ERROR_ALREADY_FINISHED
this call is already finished (writes_done or write_status has already been called)
Definition: grpc_types.h:458
@ GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN
completion queue has been shutdown
Definition: grpc_types.h:475
@ GRPC_CALL_ERROR_ALREADY_ACCEPTED
this method must be called before server_accept
Definition: grpc_types.h:451
@ GRPC_CALL_OK
everything went ok
Definition: grpc_types.h:443
@ GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH
payload type requested is not the type registered
Definition: grpc_types.h:473
@ GRPC_CALL_ERROR_NOT_INVOKED
this method must be called after invoke
Definition: grpc_types.h:455
@ GRPC_CALL_ERROR_NOT_ON_CLIENT
this method is not available on the client
Definition: grpc_types.h:449
@ GRPC_CALL_ERROR_INVALID_MESSAGE
invalid message was passed to this call
Definition: grpc_types.h:466
@ GRPC_CALL_ERROR_TOO_MANY_OPERATIONS
there is already an outstanding read/write operation on the call
Definition: grpc_types.h:460
@ GRPC_CALL_ERROR
something failed, we don't know what
Definition: grpc_types.h:445
@ GRPC_CALL_ERROR_BATCH_TOO_BIG
this batch of operations leads to more operations than allowed
Definition: grpc_types.h:471
@ GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE
completion queue for notification has not been registered with the server
Definition: grpc_types.h:469
@ GRPC_CALL_ERROR_INVALID_FLAGS
the flags value was illegal for this call
Definition: grpc_types.h:462
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:70
struct grpc_metadata grpc_metadata
A single metadata element.
struct grpc_resource_quota grpc_resource_quota
Definition: grpc_types.h:713
grpc_cq_completion_type
Specifies the type of APIs to use to pop events from the completion queue.
Definition: grpc_types.h:742
@ GRPC_CQ_NEXT
Events are popped out by calling grpc_completion_queue_next() API ONLY.
Definition: grpc_types.h:744
@ GRPC_CQ_PLUCK
Events are popped out by calling grpc_completion_queue_pluck() API ONLY.
Definition: grpc_types.h:747
@ GRPC_CQ_CALLBACK
Events trigger a callback specified as the tag.
Definition: grpc_types.h:750
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc_types.h:65
grpc_op_type
Definition: grpc_types.h:577
@ 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:596
@ 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:611
@ 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:591
@ 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:617
@ GRPC_OP_SEND_MESSAGE
Send a message: 0 or more of these operations can occur for each call.
Definition: grpc_types.h:586
@ 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:601
@ 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:582
@ GRPC_OP_RECV_MESSAGE
Receive a message: 0 or more of these operations can occur for each call.
Definition: grpc_types.h:605
struct grpc_channel grpc_channel
The Channel interface allows creation of Call objects.
Definition: grpc_types.h:62
struct grpc_completion_queue_attributes grpc_completion_queue_attributes
struct grpc_byte_buffer grpc_byte_buffer
struct grpc_socket_factory grpc_socket_factory
The Socket Factory interface creates and binds sockets.
Definition: grpc_types.h:76
grpc_cq_polling_type
Completion queues internally MAY maintain a set of file descriptors in a structure called 'pollset'.
Definition: grpc_types.h:724
@ GRPC_CQ_NON_POLLING
The completion queue will not have an associated pollset.
Definition: grpc_types.h:738
@ GRPC_CQ_NON_LISTENING
Similar to GRPC_CQ_DEFAULT_POLLING except that the completion queues will not contain any 'listening ...
Definition: grpc_types.h:732
@ 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:727
struct grpc_socket_mutator grpc_socket_mutator
The Socket Mutator interface allows changes on socket options.
Definition: grpc_types.h:73
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:798
struct grpc_completion_queue grpc_completion_queue
Completion Queues enable notification of the completion of asynchronous actions.
Definition: grpc_types.h:56
struct grpc_arg_pointer_vtable grpc_arg_pointer_vtable
grpc_completion_type
The type of completion (for grpc_event)
Definition: grpc_types.h:536
@ GRPC_OP_COMPLETE
Operation completion.
Definition: grpc_types.h:542
@ GRPC_QUEUE_TIMEOUT
No event before timeout.
Definition: grpc_types.h:540
@ GRPC_QUEUE_SHUTDOWN
Shutting down.
Definition: grpc_types.h:538
grpc_byte_buffer_type
Definition: grpc_types.h:35
@ GRPC_BB_RAW
Future types may include GRPC_BB_PROTOBUF, etc.
Definition: grpc_types.h:36
grpc_completion_queue_functor grpc_experimental_completion_queue_functor
Definition: grpc_types.h:774
struct grpc_completion_queue_functor grpc_completion_queue_functor
Specifies an interface class to be used as a tag for callback-based completion queues.
struct grpc_event grpc_event
The result of an operation.
Analogous to struct timespec.
Definition: gpr_types.h:47
Definition: grpc_types.h:109
const grpc_arg_pointer_vtable * vtable
Definition: grpc_types.h:111
void * p
Definition: grpc_types.h:110
Definition: grpc_types.h:85
int(* cmp)(void *p, void *q)
Definition: grpc_types.h:88
void(* destroy)(void *p)
Definition: grpc_types.h:87
A single argument...
Definition: grpc_types.h:103
grpc_arg_type type
Definition: grpc_types.h:104
char * key
Definition: grpc_types.h:105
grpc_compression_algorithm compression
Definition: grpc_types.h:48
grpc_slice_buffer slice_buffer
Definition: grpc_types.h:49
Definition: grpc_types.h:40
void * reserved
Definition: grpc_types.h:41
union grpc_byte_buffer::grpc_byte_buffer_data data
grpc_byte_buffer_type type
Definition: grpc_types.h:42
Definition: grpc_types.h:569
void * reserved
Definition: grpc_types.h:574
gpr_timespec deadline
Definition: grpc_types.h:572
grpc_slice method
Definition: grpc_types.h:570
uint32_t flags
Definition: grpc_types.h:573
grpc_slice host
Definition: grpc_types.h:571
An array of arguments that can be passed around.
Definition: grpc_types.h:132
grpc_arg * args
Definition: grpc_types.h:134
size_t num_args
Definition: grpc_types.h:133
Information requested from the channel.
Definition: grpc_types.h:704
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:710
char ** lb_policy_name
If non-NULL, will be set to point to a string indicating the LB policy name.
Definition: grpc_types.h:707
Definition: grpc_types.h:778
grpc_cq_completion_type cq_completion_type
Set to GRPC_CQ_CURRENT_VERSION.
Definition: grpc_types.h:783
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:792
int version
The version number of this structure.
Definition: grpc_types.h:781
grpc_cq_polling_type cq_polling_type
Definition: grpc_types.h:785
Specifies an interface class to be used as a tag for callback-based completion queues.
Definition: grpc_types.h:757
int inlineable
The inlineable member specifies whether this functor can be run inline.
Definition: grpc_types.h:766
int internal_success
The following fields are not API.
Definition: grpc_types.h:769
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:762
struct grpc_completion_queue_functor * internal_next
Definition: grpc_types.h:770
The result of an operation.
Definition: grpc_types.h:548
void * tag
The tag passed to grpc_call_start_batch etc to start this operation.
Definition: grpc_types.h:560
grpc_completion_type type
The type of the completion.
Definition: grpc_types.h:550
int success
If the grpc_completion_type is GRPC_OP_COMPLETE, this field indicates whether the operation was succe...
Definition: grpc_types.h:556
Definition: grpc_types.h:563
size_t count
Definition: grpc_types.h:564
size_t capacity
Definition: grpc_types.h:565
grpc_metadata * metadata
Definition: grpc_types.h:566
A single metadata element.
Definition: grpc_types.h:519
uint32_t flags
Definition: grpc_types.h:525
void * obfuscated[4]
Definition: grpc_types.h:531
struct grpc_metadata::@1 internal_data
The following fields are reserved for grpc internal use.
grpc_slice key
the key, value values are expected to line up with grpc_mdelem: if changing them, update metadata....
Definition: grpc_types.h:522
grpc_slice value
Definition: grpc_types.h:523
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:698
ownership of the array is with the caller, but ownership of the elements stays with the call object (...
Definition: grpc_types.h:668
grpc_metadata_array * recv_initial_metadata
Definition: grpc_types.h:669
ownership of the byte buffer is moved to the caller; the caller must call grpc_byte_buffer_destroy on...
Definition: grpc_types.h:676
struct grpc_byte_buffer ** recv_message
Definition: grpc_types.h:677
grpc_status_code * status
Definition: grpc_types.h:686
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:691
grpc_slice * status_details
Definition: grpc_types.h:687
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:685
If is_set, compression_level will be used for the call.
Definition: grpc_types.h:641
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata::grpc_op_send_initial_metadata_maybe_compression_level maybe_compression_level
grpc_metadata * metadata
Definition: grpc_types.h:638
size_t count
Definition: grpc_types.h:637
struct grpc_byte_buffer * send_message
This op takes ownership of the slices in send_message.
Definition: grpc_types.h:652
grpc_metadata * trailing_metadata
Definition: grpc_types.h:656
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:661
size_t trailing_metadata_count
Definition: grpc_types.h:655
grpc_status_code status
Definition: grpc_types.h:657
Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments)
Definition: grpc_types.h:624
union grpc_op::grpc_op_data data
void * reserved
Reserved for future usage.
Definition: grpc_types.h:630
uint32_t flags
Write flags bitset for grpc_begin_messages.
Definition: grpc_types.h:628
grpc_op_type op
Operation type, as defined by grpc_op_type.
Definition: grpc_types.h:626
Represents an expandable array of slices, to be interpreted as a single item.
Definition: slice.h:78
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice.h:60
Definition: grpc_types.h:106
int integer
Definition: grpc_types.h:108
char * string
Definition: grpc_types.h:107
Definition: grpc_types.h:43
void * reserved[8]
Definition: grpc_types.h:45
struct grpc_byte_buffer::grpc_byte_buffer_data::grpc_compressed_buffer raw
Definition: grpc_types.h:631
struct grpc_op::grpc_op_data::grpc_op_recv_message recv_message
struct grpc_op::grpc_op_data::grpc_op_recv_initial_metadata recv_initial_metadata
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata send_initial_metadata
struct grpc_op::grpc_op_data::grpc_op_send_message send_message
struct grpc_op::grpc_op_data::grpc_op_recv_close_on_server recv_close_on_server
struct grpc_op::grpc_op_data::grpc_op_recv_status_on_client recv_status_on_client
struct grpc_op::grpc_op_data::grpc_op_send_status_from_server send_status_from_server
void * reserved[8]
Definition: grpc_types.h:634