aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/load_reporting/load_reporting.h
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-05-02 09:20:21 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2016-05-02 09:20:21 -0700
commit4bb11ac72ade5c76c4b24c9a8a8636e9a52be003 (patch)
tree00ff888259d9b9c17782887ac5bba716894cf52d /src/core/ext/load_reporting/load_reporting.h
parent580987abf03dc075c90e0ea5b787441191be8c95 (diff)
Turned load reporting into a plugin
Diffstat (limited to 'src/core/ext/load_reporting/load_reporting.h')
-rw-r--r--src/core/ext/load_reporting/load_reporting.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/core/ext/load_reporting/load_reporting.h b/src/core/ext/load_reporting/load_reporting.h
index fcf555da85..806af2bda7 100644
--- a/src/core/ext/load_reporting/load_reporting.h
+++ b/src/core/ext/load_reporting/load_reporting.h
@@ -37,28 +37,28 @@
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/surface/call.h"
-typedef struct grpc_load_reporting_data grpc_load_reporting_data;
+typedef struct grpc_load_reporting_config grpc_load_reporting_config;
-/** Custom function to be called by the load reporting filter.
- *
- * The \a data pointer is the same as the one passed to \a
- * grpc_load_reporting_init. \a stats are the final per-call statistics gathered
- * by the gRPC runtime. */
-typedef void (*grpc_load_reporting_fn)(void *data,
- const grpc_call_stats *stats);
+/** Custom function to be called by the load reporting filter. */
+typedef void (*grpc_load_reporting_fn)(const grpc_call_stats *stats,
+ void *data);
/** Register \a fn as the function to be invoked by the load reporting filter,
- * passing \a data as its namesake argument. To be called only from a plugin
- * init function. */
-grpc_load_reporting_data *grpc_load_reporting_create(grpc_load_reporting_fn fn,
- void *data);
+ * passing \a data alongisde the call stats */
+grpc_load_reporting_config *grpc_load_reporting_config_create(
+ grpc_load_reporting_fn fn, void *data);
+
+grpc_load_reporting_config *grpc_load_reporting_config_copy(
+ grpc_load_reporting_config *src);
-// XXX
-void grpc_load_reporting_destroy(grpc_load_reporting_data *lrd);
+void grpc_load_reporting_config_destroy(grpc_load_reporting_config *lrc);
/** Invoke the function registered by \a grpc_load_reporting_init, passing it \a
* stats as one of the arguments (see \a load_reporting_fn). */
-void grpc_load_reporting_call(grpc_load_reporting_data *lrd,
- const grpc_call_stats *stats);
+void grpc_load_reporting_config_call(grpc_load_reporting_config *lrc,
+ const grpc_call_stats *stats);
+
+/** Return a \a grpc_arg enabling load reporting */
+grpc_arg grpc_load_reporting_config_create_arg(grpc_load_reporting_config *lrc);
#endif /* GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H */