aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-07-08 07:44:54 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-07-08 07:44:54 -0700
commit98d60fcb9adbf3379ddf3595f5a5de8289415f92 (patch)
treeae9101c565f64fcbcb4eb8cd7b5d3e3bdb5eb720 /include
parentd9b6fcfee4cb986f148762a4a7d0794de9b3ba62 (diff)
parent3b685b744818ec73580aff961f85c22b11e61ab0 (diff)
Merge github.com:grpc/grpc into hosts-need-names-too
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/client_context.h6
-rw-r--r--include/grpc/census.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h
index 5e10875260..4d96d862e7 100644
--- a/include/grpc++/client_context.h
+++ b/include/grpc++/client_context.h
@@ -46,6 +46,7 @@
struct grpc_call;
struct grpc_completion_queue;
+struct census_context;
namespace grpc {
@@ -107,6 +108,10 @@ class ClientContext {
creds_ = creds;
}
+ // Get and set census context
+ void set_census_context(census_context* ccp) { census_context_ = ccp; }
+ census_context* get_census_context() const { return census_context_; }
+
void TryCancel();
private:
@@ -154,6 +159,7 @@ class ClientContext {
gpr_timespec deadline_;
grpc::string authority_;
std::shared_ptr<Credentials> creds_;
+ census_context* census_context_;
std::multimap<grpc::string, grpc::string> send_initial_metadata_;
std::multimap<grpc::string, grpc::string> recv_initial_metadata_;
std::multimap<grpc::string, grpc::string> trailing_metadata_;
diff --git a/include/grpc/census.h b/include/grpc/census.h
index b2049b3289..3fc07affc8 100644
--- a/include/grpc/census.h
+++ b/include/grpc/census.h
@@ -61,6 +61,10 @@ enum census_functions {
int census_initialize(int functions);
void census_shutdown();
+/* If any census feature has been initialized, this funtion will return a
+ * non-zero value. */
+int census_available();
+
/* Internally, Census relies on a context, which should be propagated across
* RPC's. From the RPC subsystems viewpoint, this is an opaque data structure.
* A context must be used as the first argument to all other census