aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-07-29 18:09:47 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-07-29 18:09:47 -0700
commit1aceadd92cd72064f6a8e6d2646e83f130131a92 (patch)
tree63f35f7cfff7fa20c682490d756ec436ab3c71f3 /include
parentf0295cb88598ccc7428ad67d8d7bddbc29620152 (diff)
parent7b582f6229c8ca784d4b0b7cf9727ca6af71c0a7 (diff)
Merge github.com:grpc/grpc into yeah-we-know-what-youre-talking-about
Conflicts: src/core/channel/http_client_filter.c src/core/surface/channel.c
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/dynamic_thread_pool.h1
-rw-r--r--include/grpc++/impl/sync_no_cxx11.h2
-rw-r--r--include/grpc++/server_credentials.h3
-rw-r--r--include/grpc/census.h32
-rw-r--r--include/grpc/grpc.h4
-rw-r--r--include/grpc/grpc_security.h9
6 files changed, 31 insertions, 20 deletions
diff --git a/include/grpc++/dynamic_thread_pool.h b/include/grpc++/dynamic_thread_pool.h
index bc4e2d4d74..f0cd35940f 100644
--- a/include/grpc++/dynamic_thread_pool.h
+++ b/include/grpc++/dynamic_thread_pool.h
@@ -41,6 +41,7 @@
#include <grpc++/thread_pool_interface.h>
#include <list>
+#include <memory>
#include <queue>
namespace grpc {
diff --git a/include/grpc++/impl/sync_no_cxx11.h b/include/grpc++/impl/sync_no_cxx11.h
index fda668957e..5869b04c76 100644
--- a/include/grpc++/impl/sync_no_cxx11.h
+++ b/include/grpc++/impl/sync_no_cxx11.h
@@ -87,7 +87,7 @@ class condition_variable {
~condition_variable() { gpr_cv_destroy(&cv_); }
void wait(lock_guard<mutex> &mu) {
mu.locked = false;
- gpr_cv_wait(&cv_, &mu.mu_.mu_, gpr_inf_future(GPR_CLOCK_REALTIME);
+ gpr_cv_wait(&cv_, &mu.mu_.mu_, gpr_inf_future(GPR_CLOCK_REALTIME));
mu.locked = true;
}
void notify_one() { gpr_cv_signal(&cv_); }
diff --git a/include/grpc++/server_credentials.h b/include/grpc++/server_credentials.h
index 83ae9fd1eb..11acd67e8a 100644
--- a/include/grpc++/server_credentials.h
+++ b/include/grpc++/server_credentials.h
@@ -58,12 +58,15 @@ class ServerCredentials {
// Options to create ServerCredentials with SSL
struct SslServerCredentialsOptions {
+ SslServerCredentialsOptions() : force_client_auth(false) {}
+
struct PemKeyCertPair {
grpc::string private_key;
grpc::string cert_chain;
};
grpc::string pem_root_certs;
std::vector<PemKeyCertPair> pem_key_cert_pairs;
+ bool force_client_auth;
};
// Builds SSL ServerCredentials given SSL specific options
diff --git a/include/grpc/census.h b/include/grpc/census.h
index 379783905a..7603dfdce1 100644
--- a/include/grpc/census.h
+++ b/include/grpc/census.h
@@ -44,26 +44,30 @@
extern "C" {
#endif
-/* Identify census functionality that can be enabled via census_initialize(). */
-enum census_functions {
- CENSUS_NONE = 0, /* Do not enable census. */
- CENSUS_TRACING = 1, /* Enable census tracing. */
- CENSUS_STATS = 2, /* Enable Census stats collection. */
- CENSUS_CPU = 4, /* Enable Census CPU usage collection. */
- CENSUS_ALL = CENSUS_TRACING | CENSUS_STATS | CENSUS_CPU
+/* Identify census features that can be enabled via census_initialize(). */
+enum census_features {
+ CENSUS_FEATURE_NONE = 0, /* Do not enable census. */
+ CENSUS_FEATURE_TRACING = 1, /* Enable census tracing. */
+ CENSUS_FEATURE_STATS = 2, /* Enable Census stats collection. */
+ CENSUS_FEATURE_CPU = 4, /* Enable Census CPU usage collection. */
+ CENSUS_FEATURE_ALL =
+ CENSUS_FEATURE_TRACING | CENSUS_FEATURE_STATS | CENSUS_FEATURE_CPU
};
-/* Shutdown and startup census subsystem. The 'functions' argument should be
- * the OR (|) of census_functions values. If census fails to initialize, then
+/** Shutdown and startup census subsystem. The 'features' argument should be
+ * the OR (|) of census_features values. If census fails to initialize, then
* census_initialize() will return a non-zero value. It is an error to call
* census_initialize() more than once (without an intervening
* census_shutdown()). */
-int census_initialize(int functions);
-void census_shutdown();
+int census_initialize(int features);
+void census_shutdown(void);
-/* If any census feature has been initialized, this funtion will return a
- * non-zero value. */
-int census_available();
+/** Return the features supported by the current census implementation (not all
+ * features will be available on all platforms). */
+int census_supported(void);
+
+/** Return the census features currently enabled. */
+int census_enabled(void);
/* Internally, Census relies on a context, which should be propagated across
* RPC's. From the RPC subsystems viewpoint, this is an opaque data structure.
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 8e3bbbf4cb..c548549159 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -471,8 +471,8 @@ char *grpc_channel_get_target(grpc_channel *channel);
clients will want to simply pass NULL. See grpc_channel_args definition for
more on this. The data in 'args' need only live through the invocation of
this function. */
-grpc_channel *grpc_channel_create(const char *target,
- const grpc_channel_args *args);
+grpc_channel *grpc_insecure_channel_create(const char *target,
+ const grpc_channel_args *args);
/** Create a lame client: this client fails every operation attempted on it. */
grpc_channel *grpc_lame_client_channel_create(const char *target);
diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h
index 29eddc57a8..ff84050c6d 100644
--- a/include/grpc/grpc_security.h
+++ b/include/grpc/grpc_security.h
@@ -87,7 +87,7 @@ typedef struct {
directory).
- pem_key_cert_pair is a pointer on the object containing client's private
key and certificate chain. This parameter can be NULL if the client does
- not have such a key/cert pair. */
+ not have such a key/cert pair. */
grpc_credentials *grpc_ssl_credentials_create(
const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair);
@@ -174,10 +174,13 @@ void grpc_server_credentials_release(grpc_server_credentials *creds);
- pem_key_cert_pairs is an array private key / certificate chains of the
server. This parameter cannot be NULL.
- num_key_cert_pairs indicates the number of items in the private_key_files
- and cert_chain_files parameters. It should be at least 1. */
+ and cert_chain_files parameters. It should be at least 1.
+ - force_client_auth, if set to non-zero will force the client to authenticate
+ with an SSL cert. Note that this option is ignored if pem_root_certs is
+ NULL. */
grpc_server_credentials *grpc_ssl_server_credentials_create(
const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs,
- size_t num_key_cert_pairs);
+ size_t num_key_cert_pairs, int force_client_auth);
/* --- Server-side secure ports. --- */