Go to the documentation of this file.
19 #ifndef GRPC_IMPL_CODEGEN_GRPC_TYPES_H
20 #define GRPC_IMPL_CODEGEN_GRPC_TYPES_H
86 void* (*copy)(
void* p);
88 int (*
cmp)(
void* p,
void* q);
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"
207 #define GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS \
208 "grpc.http2.min_time_between_pings_ms"
212 #define GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS \
213 "grpc.http2.min_ping_interval_without_data_ms"
215 #define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme"
219 #define GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA \
220 "grpc.http2.max_pings_without_data"
224 #define GRPC_ARG_HTTP2_MAX_PING_STRIKES "grpc.http2.max_ping_strikes"
227 #define GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE "grpc.http2.write_buffer_size"
230 #define GRPC_ARG_HTTP2_ENABLE_TRUE_BINARY "grpc.http2.true_binary"
233 #define GRPC_ARG_KEEPALIVE_TIME_MS "grpc.keepalive_time_ms"
237 #define GRPC_ARG_KEEPALIVE_TIMEOUT_MS "grpc.keepalive_timeout_ms"
240 #define GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS \
241 "grpc.keepalive_permit_without_calls"
244 #define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority"
247 #define GRPC_ARG_PRIMARY_USER_AGENT_STRING "grpc.primary_user_agent"
250 #define GRPC_ARG_SECONDARY_USER_AGENT_STRING "grpc.secondary_user_agent"
252 #define GRPC_ARG_MIN_RECONNECT_BACKOFF_MS "grpc.min_reconnect_backoff_ms"
254 #define GRPC_ARG_MAX_RECONNECT_BACKOFF_MS "grpc.max_reconnect_backoff_ms"
256 #define GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS \
257 "grpc.initial_reconnect_backoff_ms"
259 #define GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS \
260 "grpc.dns_min_time_between_resolutions_ms"
263 #define GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS "grpc.server_handshake_timeout_ms"
271 #define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override"
275 #define GRPC_SSL_SESSION_CACHE_ARG "grpc.ssl_session_cache"
283 #define GRPC_ARG_TSI_MAX_FRAME_SIZE "grpc.tsi.max_frame_size"
286 #define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size"
288 #define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport"
292 #define GRPC_ARG_RESOURCE_QUOTA "grpc.resource_quota"
294 #define GRPC_ARG_EXPAND_WILDCARD_ADDRS "grpc.expand_wildcard_addrs"
297 #define GRPC_ARG_SERVICE_CONFIG "grpc.service_config"
299 #define GRPC_ARG_SERVICE_CONFIG_DISABLE_RESOLUTION \
300 "grpc.service_config_disable_resolution"
302 #define GRPC_ARG_LB_POLICY_NAME "grpc.lb_policy_name"
304 #define GRPC_ARG_SOCKET_MUTATOR "grpc.socket_mutator"
306 #define GRPC_ARG_SOCKET_FACTORY "grpc.socket_factory"
311 #define GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE \
312 "grpc.max_channel_trace_event_memory_per_node"
316 #define GRPC_ARG_ENABLE_CHANNELZ "grpc.enable_channelz"
319 #define GRPC_ARG_USE_CRONET_PACKET_COALESCING \
320 "grpc.use_cronet_packet_coalescing"
323 #define GRPC_ARG_TCP_READ_CHUNK_SIZE "grpc.experimental.tcp_read_chunk_size"
327 #define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
328 #define GRPC_ARG_TCP_MIN_READ_CHUNK_SIZE \
329 "grpc.experimental.tcp_min_read_chunk_size"
330 #define GRPC_ARG_TCP_MAX_READ_CHUNK_SIZE \
331 "grpc.experimental.tcp_max_read_chunk_size"
334 #define GRPC_ARG_TCP_TX_ZEROCOPY_ENABLED \
335 "grpc.experimental.tcp_tx_zerocopy_enabled"
338 #define GRPC_ARG_TCP_TX_ZEROCOPY_SEND_BYTES_THRESHOLD \
339 "grpc.experimental.tcp_tx_zerocopy_send_bytes_threshold"
344 #define GRPC_ARG_TCP_TX_ZEROCOPY_MAX_SIMULT_SENDS \
345 "grpc.experimental.tcp_tx_zerocopy_max_simultaneous_sends"
348 #define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_call_timeout_ms"
352 #define GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS "grpc.grpclb_fallback_timeout_ms"
356 #define GRPC_ARG_PRIORITY_FAILOVER_TIMEOUT_MS \
357 "grpc.priority_failover_timeout_ms"
361 #define GRPC_ARG_XDS_RESOURCE_DOES_NOT_EXIST_TIMEOUT_MS \
362 "grpc.xds_resource_does_not_exist_timeout_ms"
364 #define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION \
365 "grpc.workaround.cronet_compression"
373 #define GRPC_ARG_OPTIMIZATION_TARGET "grpc.optimization_target"
379 #define GRPC_ARG_ENABLE_RETRIES "grpc.enable_retries"
381 #define GRPC_ARG_PER_RPC_RETRY_BUFFER_SIZE "grpc.per_rpc_retry_buffer_size"
384 #define GRPC_ARG_MOBILE_LOG_CONTEXT "grpc.mobile_log_context"
386 #define GRPC_ARG_DISABLE_CLIENT_AUTHORITY_FILTER \
387 "grpc.disable_client_authority_filter"
389 #define GRPC_ARG_ENABLE_HTTP_PROXY "grpc.enable_http_proxy"
392 #define GRPC_ARG_HTTP_PROXY "grpc.http_proxy"
395 #define GRPC_ARG_SURFACE_USER_AGENT "grpc.surface_user_agent"
398 #define GRPC_ARG_INHIBIT_HEALTH_CHECKING "grpc.inhibit_health_checking"
403 #define GRPC_ARG_DNS_ENABLE_SRV_QUERIES "grpc.dns_enable_srv_queries"
410 #define GRPC_ARG_DNS_ARES_QUERY_TIMEOUT_MS "grpc.dns_ares_query_timeout"
413 #define GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL "grpc.use_local_subchannel_pool"
415 #define GRPC_ARG_CHANNEL_POOL_DOMAIN "grpc.channel_pooling_domain"
417 #define GRPC_ARG_CHANNEL_ID "grpc.channel_id"
463 #define GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH -1
464 #define GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH (4 * 1024 * 1024)
470 #define GRPC_WRITE_BUFFER_HINT (0x00000001u)
473 #define GRPC_WRITE_NO_COMPRESS (0x00000002u)
475 #define GRPC_WRITE_THROUGH (0x00000004u)
477 #define GRPC_WRITE_USED_MASK \
478 (GRPC_WRITE_BUFFER_HINT | GRPC_WRITE_NO_COMPRESS | GRPC_WRITE_THROUGH)
482 #define GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST (0x00000010u)
484 #define GRPC_INITIAL_METADATA_WAIT_FOR_READY (0x00000020u)
486 #define GRPC_INITIAL_METADATA_CACHEABLE_REQUEST (0x00000040u)
489 #define GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET (0x00000080u)
491 #define GRPC_INITIAL_METADATA_CORKED (0x00000100u)
494 #define GRPC_INITIAL_METADATA_USED_MASK \
495 (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \
496 GRPC_INITIAL_METADATA_WAIT_FOR_READY | \
497 GRPC_INITIAL_METADATA_CACHEABLE_REQUEST | \
498 GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET | \
499 GRPC_INITIAL_METADATA_CORKED | GRPC_WRITE_THROUGH)
757 #define GRPC_CQ_CURRENT_VERSION 2
758 #define GRPC_CQ_VERSION_MINIMUM_FOR_CALLBACKABLE 2
A single argument...
Definition: grpc_types.h:103
struct grpc_byte_buffer * send_message
This op takes ownership of the slices in send_message.
Definition: grpc_types.h:635
uint32_t flags
Write flags bitset for grpc_begin_messages.
Definition: grpc_types.h:611
grpc_call_error
Result of a grpc call.
Definition: grpc_types.h:424
this method must be called before invoke
Definition: grpc_types.h:436
int inlineable
The inlineable member specifies whether this functor can be run inline.
Definition: grpc_types.h:748
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:668
grpc_completion_type
The type of completion (for grpc_event)
Definition: grpc_types.h:519
grpc_status_code * status
Definition: grpc_types.h:669
grpc_arg_type
Type specifier for grpc_arg.
Definition: grpc_types.h:79
there is already an outstanding read/write operation on the call
Definition: grpc_types.h:443
Definition: grpc_types.h:81
Events are popped out by calling grpc_completion_queue_next() API ONLY.
Definition: grpc_types.h:725
struct grpc_completion_queue_attributes grpc_completion_queue_attributes
grpc_status_code
Definition: status.h:26
Definition: grpc_types.h:637
struct grpc_socket_mutator grpc_socket_mutator
The Socket Mutator interface allows changes on socket options.
Definition: grpc_types.h:73
uint32_t flags
Definition: grpc_types.h:556
struct grpc_resource_quota grpc_resource_quota
Definition: grpc_types.h:694
something failed, we don't know what
Definition: grpc_types.h:428
invalid message was passed to this call
Definition: grpc_types.h:449
Definition: grpc_types.h:80
grpc_cq_polling_type
Completion queues internally MAY maintain a set of file descriptors in a structure called 'pollset'.
Definition: grpc_types.h:705
Definition: grpc_types.h:552
void * reserved
Reserved for future usage.
Definition: grpc_types.h:613
grpc_experimental_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:773
grpc_compression_algorithm
The various compression algorithms supported by gRPC (not sorted by compression level)
Definition: compression_types.h:57
grpc_cq_completion_type
Specifies the type of APIs to use to pop events from the completion queue.
Definition: grpc_types.h:723
this method is not available on the client
Definition: grpc_types.h:432
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata send_initial_metadata
Definition: grpc_types.h:629
Definition: grpc_types.h:43
completion queue has been shutdown
Definition: grpc_types.h:458
Shutting down.
Definition: grpc_types.h:521
void * reserved
Definition: grpc_types.h:41
Operation completion.
Definition: grpc_types.h:525
struct grpc_byte_buffer grpc_byte_buffer
everything went ok
Definition: grpc_types.h:426
struct grpc_op::grpc_op_data::grpc_op_send_message send_message
grpc_slice method
Definition: grpc_types.h:553
invalid metadata was passed to this call
Definition: grpc_types.h:447
this method is not available on the server
Definition: grpc_types.h:430
Definition: grpc_types.h:85
An array of arguments that can be passed around.
Definition: grpc_types.h:132
struct grpc_op::grpc_op_data::grpc_op_recv_initial_metadata recv_initial_metadata
Future types may include GRPC_BB_PROTOBUF, etc.
Definition: grpc_types.h:36
struct grpc_op::grpc_op_data::grpc_op_send_status_from_server send_status_from_server
The completion queue will not have an associated pollset.
Definition: grpc_types.h:719
Definition: grpc_types.h:662
grpc_byte_buffer_type type
Definition: grpc_types.h:42
union grpc_byte_buffer::grpc_byte_buffer_data data
struct grpc_byte_buffer ** recv_message
Definition: grpc_types.h:660
The completion queue will have an associated pollset and there is no restriction on the type of file ...
Definition: grpc_types.h:708
Receive initial metadata: one and only one MUST be made on the client, must not be made on the server...
Definition: grpc_types.h:584
char * string
Definition: grpc_types.h:107
this method must be called after invoke
Definition: grpc_types.h:438
Similar to GRPC_CQ_DEFAULT_POLLING except that the completion queues will not contain any 'listening ...
Definition: grpc_types.h:713
int internal_success
The following fields are not API.
Definition: grpc_types.h:751
Send status from the server: one and only one instance MUST be sent from the server unless the call w...
Definition: grpc_types.h:579
const grpc_arg_pointer_vtable * vtable
Definition: grpc_types.h:111
the flags value was illegal for this call
Definition: grpc_types.h:445
struct grpc_metadata grpc_metadata
A single metadata element.
EXPERIMENTAL: Specifies an interface class to be used as a tag for callback-based completion queues.
Definition: grpc_types.h:739
grpc_status_code status
Definition: grpc_types.h:640
void * reserved[8]
Definition: grpc_types.h:617
Definition: grpc_types.h:109
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:674
The result of an operation.
Definition: grpc_types.h:531
grpc_op_type
Definition: grpc_types.h:560
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:70
Definition: grpc_types.h:40
struct grpc_alarm grpc_alarm
An alarm associated with a completion queue.
Definition: grpc_types.h:59
Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments)
Definition: grpc_types.h:607
Send a message: 0 or more of these operations can occur for each call.
Definition: grpc_types.h:569
size_t num_args
Definition: grpc_types.h:133
Definition: grpc_types.h:676
struct grpc_op::grpc_op_data::grpc_op_recv_message recv_message
grpc_metadata * trailing_metadata
Definition: grpc_types.h:639
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice.h:60
void * p
Definition: grpc_types.h:110
struct grpc_socket_factory grpc_socket_factory
The Socket Factory interface creates and binds sockets.
Definition: grpc_types.h:76
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc_types.h:65
void(* destroy)(void *p)
Definition: grpc_types.h:87
struct grpc_op::grpc_op_data::grpc_op_recv_status_on_client recv_status_on_client
union grpc_op::grpc_op_data data
Events are popped out by calling grpc_completion_queue_pluck() API ONLY.
Definition: grpc_types.h:728
Definition: grpc_types.h:759
int version
The version number of this structure.
Definition: grpc_types.h:762
grpc_op_type op
Operation type, as defined by grpc_op_type.
Definition: grpc_types.h:609
grpc_slice * status_details
Definition: grpc_types.h:670
struct grpc_op grpc_op
Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments)
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:779
Receive a message: 0 or more of these operations can occur for each call.
Definition: grpc_types.h:588
this method must be called before server_accept
Definition: grpc_types.h:434
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:691
payload type requested is not the type registered
Definition: grpc_types.h:456
grpc_slice host
Definition: grpc_types.h:554
Send initial metadata: one and only one instance MUST be sent for each call, unless the call was canc...
Definition: grpc_types.h:565
void(* functor_run)(struct grpc_experimental_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:744
char ** lb_policy_name
If non-NULL, will be set to point to a string indicating the LB policy name.
Definition: grpc_types.h:688
struct grpc_op::grpc_op_data::grpc_op_recv_close_on_server recv_close_on_server
grpc_compression_algorithm compression
Definition: grpc_types.h:48
grpc_byte_buffer_type
Definition: grpc_types.h:35
struct grpc_experimental_completion_queue_functor grpc_experimental_completion_queue_functor
EXPERIMENTAL: Specifies an interface class to be used as a tag for callback-based completion queues.
this batch of operations leads to more operations than allowed
Definition: grpc_types.h:454
grpc_compression_level
Compression levels allow a party with knowledge of its peer's accepted encodings to request compressi...
Definition: compression_types.h:71
struct grpc_experimental_completion_queue_functor * internal_next
Definition: grpc_types.h:752
size_t trailing_metadata_count
Definition: grpc_types.h:638
char * key
Definition: grpc_types.h:105
Definition: grpc_types.h:614
Definition: grpc_types.h:47
struct grpc_completion_queue grpc_completion_queue
Completion Queues enable notification of the completion of asynchronous actions.
Definition: grpc_types.h:56
ownership of the byte buffer is moved to the caller; the caller must call grpc_byte_buffer_destroy on...
Definition: grpc_types.h:659
struct grpc_byte_buffer::grpc_byte_buffer_data::grpc_compressed_buffer raw
grpc_cq_completion_type cq_completion_type
Set to GRPC_CQ_CURRENT_VERSION.
Definition: grpc_types.h:764
struct grpc_channel grpc_channel
The Channel interface allows creation of Call objects.
Definition: grpc_types.h:62
grpc_slice_buffer slice_buffer
Definition: grpc_types.h:49
Receive close on the server: one and only one must be made on the server.
Definition: grpc_types.h:600
this call is already finished (writes_done or write_status has already been called)
Definition: grpc_types.h:441
grpc_cq_polling_type cq_polling_type
Definition: grpc_types.h:766
Represents an expandable array of slices, to be interpreted as a single item.
Definition: slice.h:78
Definition: grpc_types.h:82
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:644
EXPERIMENTAL: Events trigger a callback specified as the tag.
Definition: grpc_types.h:731
Analogous to struct timespec.
Definition: gpr_types.h:47
grpc_completion_type type
The type of the completion.
Definition: grpc_types.h:533
int integer
Definition: grpc_types.h:108
void * reserved[8]
Definition: grpc_types.h:45
Receive status on the client: one and only one must be made on the client.
Definition: grpc_types.h:594
grpc_arg_type type
Definition: grpc_types.h:104
int(* cmp)(void *p, void *q)
Definition: grpc_types.h:88
Information requested from the channel.
Definition: grpc_types.h:685
grpc_arg * args
Definition: grpc_types.h:134
gpr_timespec deadline
Definition: grpc_types.h:555
int success
If the grpc_completion_type is GRPC_OP_COMPLETE, this field indicates whether the operation was succe...
Definition: grpc_types.h:539
completion queue for notification has not been registered with the server
Definition: grpc_types.h:452
No event before timeout.
Definition: grpc_types.h:523
void * tag
The tag passed to grpc_call_start_batch etc to start this operation.
Definition: grpc_types.h:543
int * cancelled
out argument, set to 1 if the call failed in any way (seen as a cancellation on the server),...
Definition: grpc_types.h:679
struct grpc_arg_pointer_vtable grpc_arg_pointer_vtable
Send a close from the client: one and only one instance MUST be sent from the client,...
Definition: grpc_types.h:574
struct grpc_event grpc_event
The result of an operation.
Definition: grpc_types.h:106
void * reserved
Definition: grpc_types.h:557