125 #define GRPC_MAX_COMPLETION_QUEUE_PLUCKERS 6
179 const char *host,
gpr_timespec deadline,
void *reserved);
184 void *tag,
void *reserved);
188 const char *method,
const char *host,
209 const grpc_op *ops,
size_t nops,
210 void *tag,
void *reserved);
246 const char *target,
grpc_status_code error_code,
const char *error_message);
272 const char *description,
void *reserved);
302 const char *method,
const char *host);
struct grpc_call grpc_call
A Call represents an RPC.
Definition: grpc_types.h:62
GRPCAPI grpc_call_error grpc_call_cancel_with_status(grpc_call *call, grpc_status_code status, const char *description, void *reserved)
Called by clients to cancel an RPC on the server.
GRPCAPI void grpc_server_shutdown_and_notify(grpc_server *server, grpc_completion_queue *cq, void *tag)
Begin shutting down a server.
GRPCAPI grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved)
Blocks until an event is available, the completion queue is being shut down, or deadline is reached...
GRPCAPI int grpc_header_nonbin_value_is_legal(const char *value, size_t length)
Check whether a non-binary metadata value is legal (will be accepted by core)
An array of arguments that can be passed around.
Definition: grpc_types.h:110
struct grpc_channel grpc_channel
The Channel interface allows creation of Call objects.
Definition: grpc_types.h:54
GRPCAPI void grpc_server_register_completion_queue(grpc_server *server, grpc_completion_queue *cq, void *reserved)
Register a completion queue with the server.
GRPCAPI const char * grpc_version_string(void)
Return a string representing the current version of grpc.
The result of an operation.
Definition: grpc_types.h:230
GRPCAPI void grpc_channel_ping(grpc_channel *channel, grpc_completion_queue *cq, void *tag, void *reserved)
Ping the channels peer (load balanced channels will select one sub-channel to ping); if the channel i...
GRPCAPI void grpc_alarm_destroy(grpc_alarm *alarm)
Destroy the given completion queue alarm, cancelling it in the process.
GRPCAPI void * grpc_server_register_method(grpc_server *server, const char *method, const char *host)
Registers a method in the server.
GRPCAPI grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved)
Called by clients to cancel an RPC on the server.
GRPCAPI void grpc_call_details_destroy(grpc_call_details *details)
GRPCAPI void grpc_server_start(grpc_server *server)
Start a server - tells all listeners to start listening.
GRPCAPI void grpc_alarm_cancel(grpc_alarm *alarm)
Cancel a completion queue alarm.
struct grpc_server grpc_server
A server listens to some port and responds to request calls.
Definition: grpc_types.h:57
Definition: grpc_types.h:247
Definition: byte_buffer.h:49
GRPCAPI grpc_call_error grpc_server_request_call(grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new)
Request notification of a new call.
GRPCAPI char * grpc_call_get_peer(grpc_call *call)
Returns a newly allocated string representing the endpoint to which this call is communicating with...
GRPCAPI void grpc_server_cancel_all_calls(grpc_server *server)
Cancel all in-progress calls.
GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state(grpc_channel *channel, int try_to_connect)
Check the connectivity state of a channel.
GRPCAPI int grpc_is_binary_header(const char *key, size_t length)
Check whether a metadata key corresponds to a binary value.
grpc_call_error
Result of a grpc call.
Definition: grpc_types.h:158
GRPCAPI grpc_completion_queue * grpc_completion_queue_create(void *reserved)
Create a completion queue.
GRPCAPI char * grpc_channel_get_target(grpc_channel *channel)
Return a newly allocated string representing the target a channel was created for.
grpc_connectivity_state
Connectivity state of a channel.
Definition: connectivity_state.h:42
GRPCAPI void grpc_call_details_init(grpc_call_details *details)
GRPCAPI grpc_channel * grpc_lame_client_channel_create(const char *target, grpc_status_code error_code, const char *error_message)
Create a lame client: this client fails every operation attempted on it.
GRPCAPI grpc_call * grpc_channel_create_registered_call(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, void *registered_call_handle, gpr_timespec deadline, void *reserved)
Create a call given a handle returned from grpc_channel_register_call.
GRPCAPI void grpc_server_destroy(grpc_server *server)
Destroy a server.
GRPCAPI void grpc_metadata_array_init(grpc_metadata_array *array)
GRPCAPI struct census_context * grpc_census_call_get_context(grpc_call *call)
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq)
Destroy a completion queue.
GRPCAPI void grpc_channel_destroy(grpc_channel *channel)
Close and destroy a grpc channel.
Operation data: one field for each op type (except SEND_CLOSE_FROM_CLIENT which has no arguments) ...
Definition: grpc_types.h:301
GRPCAPI int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr)
Add a HTTP2 over plaintext over tcp listener.
GRPCAPI void grpc_completion_queue_shutdown(grpc_completion_queue *cq)
Begin destruction of a completion queue.
struct grpc_alarm grpc_alarm
An alarm associated with a completion queue.
Definition: grpc_types.h:51
GRPCAPI void grpc_init(void)
Initialize the grpc library.
GRPCAPI grpc_alarm * grpc_alarm_create(grpc_completion_queue *cq, gpr_timespec deadline, void *tag)
Create a completion queue alarm instance associated to cq.
GRPCAPI void grpc_metadata_array_destroy(grpc_metadata_array *array)
GRPCAPI grpc_channel * grpc_insecure_channel_create(const char *target, const grpc_channel_args *args, void *reserved)
Create a client channel to 'target'.
GRPCAPI grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved)
Start a batch of operations defined in the array ops; when complete, post a completion of type 'tag' ...
GRPCAPI void grpc_shutdown(void)
Shut down the grpc library.
GRPCAPI int grpc_header_key_is_legal(const char *key, size_t length)
Check whether a metadata key is legal (will be accepted by core)
GRPCAPI void grpc_channel_watch_connectivity_state(grpc_channel *channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue *cq, void *tag)
Watch for a change in connectivity state.
GRPCAPI void * grpc_channel_register_call(grpc_channel *channel, const char *method, const char *host, void *reserved)
Pre-register a method/host pair on a channel.
GRPCAPI grpc_server * grpc_server_create(const grpc_channel_args *args, void *reserved)
Create a server.
GRPCAPI void grpc_call_destroy(grpc_call *call)
Destroy a call.
GRPCAPI grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cq, void *tag, gpr_timespec deadline, void *reserved)
Blocks until an event with tag 'tag' is available, the completion queue is being shutdown or deadline...
GRPCAPI void grpc_census_call_set_context(grpc_call *call, struct census_context *context)
GRPCAPI grpc_call_error grpc_server_request_registered_call(grpc_server *server, void *registered_method, grpc_call **call, gpr_timespec *deadline, grpc_metadata_array *request_metadata, grpc_byte_buffer **optional_payload, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new)
Request notification of a new pre-registered call.
struct grpc_completion_queue grpc_completion_queue
Completion Queues enable notification of the completion of asynchronous actions.
Definition: grpc_types.h:48
grpc_status_code
Definition: status.h:41
GRPCAPI int grpc_tracer_set_enabled(const char *name, int enabled)
Enable or disable a tracer.
GRPCAPI void grpc_register_plugin(void(*init)(void), void(*destroy)(void))
Registers a plugin to be initialized and destroyed with the library.
GRPCAPI grpc_call * grpc_channel_create_call(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, const char *method, const char *host, gpr_timespec deadline, void *reserved)
Create a call given a grpc_channel, in order to call 'method'.
struct census_context census_context
A Census Context is a handle used by Census to represent the current tracing and stats collection inf...
Definition: census.h:81