diff options
author | ncteisen <ncteisen@gmail.com> | 2018-09-25 13:37:58 -0700 |
---|---|---|
committer | ncteisen <ncteisen@gmail.com> | 2018-09-25 13:37:58 -0700 |
commit | 4fcf871806ed3a75a2da7e4b8e33fd288fc48456 (patch) | |
tree | 73051d635ea2042233003cfaf57f5db405d61aa8 /include/grpc | |
parent | cc0a1e1d7eca67f35f3c5bf002b1485df548e67e (diff) | |
parent | ccbad108e45afb7c4fb361202cc0bae5ad7e5da2 (diff) |
Merge branch 'master' of https://github.com/grpc/grpc into channelz
Diffstat (limited to 'include/grpc')
-rw-r--r-- | include/grpc/grpc.h | 5 | ||||
-rw-r--r-- | include/grpc/grpc_security.h | 4 | ||||
-rw-r--r-- | include/grpc/impl/codegen/grpc_types.h | 15 | ||||
-rw-r--r-- | include/grpc/impl/codegen/port_platform.h | 1 |
4 files changed, 20 insertions, 5 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index fc0a0d3cce..a9beee1c9e 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -111,7 +111,8 @@ GRPCAPI grpc_completion_queue* grpc_completion_queue_create_for_pluck( of GRPC_CQ_CALLBACK and grpc_cq_polling_type of GRPC_CQ_DEFAULT_POLLING. This function is experimental. */ GRPCAPI grpc_completion_queue* grpc_completion_queue_create_for_callback( - void* shutdown_callback, void* reserved); + grpc_experimental_completion_queue_functor* shutdown_callback, + void* reserved); /** Create a completion queue */ GRPCAPI grpc_completion_queue* grpc_completion_queue_create( @@ -500,7 +501,7 @@ GRPCAPI const grpc_arg_pointer_vtable* grpc_resource_quota_arg_vtable(void); GRPCAPI char* grpc_channelz_get_top_channels(intptr_t start_channel_id); /* Gets all servers that exist in the process. */ -GRPCAPI char* grpc_channelz_get_servers(intptr_t start_channel_id); +GRPCAPI char* grpc_channelz_get_servers(intptr_t start_server_id); /* Returns a single Channel, or else a NOT_FOUND code. The returned string is allocated and must be freed by the application. */ diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index 02d87a493a..de90971cc5 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -532,14 +532,14 @@ typedef struct grpc_alts_credentials_options grpc_alts_credentials_options; * It is used for experimental purpose for now and subject to change. */ GRPCAPI grpc_alts_credentials_options* -grpc_alts_credentials_client_options_create(); +grpc_alts_credentials_client_options_create(void); /** * This method creates a grpc ALTS credentials server options instance. * It is used for experimental purpose for now and subject to change. */ GRPCAPI grpc_alts_credentials_options* -grpc_alts_credentials_server_options_create(); +grpc_alts_credentials_server_options_create(void); /** * This method adds a target service account to grpc client's ALTS credentials diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 5f3b96f40b..9ed5b3c1d4 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -660,6 +660,19 @@ typedef enum { GRPC_CQ_CALLBACK } grpc_cq_completion_type; +/** EXPERIMENTAL: Specifies an interface class to be used as a tag + for callback-based completion queues. This can be used directly, + as the first element of a struct in C, or as a base class in C++. + Its "run" value should be assigned to some non-member function, such as + a static method. */ +typedef struct grpc_experimental_completion_queue_functor { + /** The run member specifies a function that will be called when this + tag is extracted from the completion queue. Its arguments will be a + pointer to this functor and a boolean that indicates whether the + operation succeeded (non-zero) or failed (zero) */ + void (*functor_run)(struct grpc_experimental_completion_queue_functor*, int); +} grpc_experimental_completion_queue_functor; + /* The upgrade to version 2 is currently experimental. */ #define GRPC_CQ_CURRENT_VERSION 2 @@ -678,7 +691,7 @@ typedef struct grpc_completion_queue_attributes { /* EXPERIMENTAL: START OF VERSION 2 CQ ATTRIBUTES */ /** When creating a callbackable CQ, pass in a functor to get invoked when * shutdown is complete */ - void* cq_shutdown_cb; + grpc_experimental_completion_queue_functor* cq_shutdown_cb; /* END OF VERSION 2 CQ ATTRIBUTES */ } grpc_completion_queue_attributes; diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 8d9bd83285..b2028a6305 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -174,6 +174,7 @@ #ifdef __GLIBC__ #define GPR_POSIX_CRASH_HANDLER 1 #define GPR_LINUX_PTHREAD_NAME 1 +#include <linux/version.h> #else /* musl libc */ #define GPR_MUSL_LIBC_COMPAT 1 #endif |