aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/census.h
diff options
context:
space:
mode:
authorGravatar Alistair Veitch <aveitch@google.com>2015-08-31 16:57:32 -0700
committerGravatar Alistair Veitch <aveitch@google.com>2015-08-31 16:57:32 -0700
commit1c09accaad6668b68ae47a7f9638bc4b79429caa (patch)
treeaa235fed3fedd75d421c3c78af57027a7674d326 /include/grpc/census.h
parentaafe9725b058d3710209bf0c95911928428eb2f2 (diff)
change aggregation_ops to internal type
Diffstat (limited to 'include/grpc/census.h')
-rw-r--r--include/grpc/census.h32
1 files changed, 4 insertions, 28 deletions
diff --git a/include/grpc/census.h b/include/grpc/census.h
index 9c0291bf96..2f36665d46 100644
--- a/include/grpc/census.h
+++ b/include/grpc/census.h
@@ -411,34 +411,10 @@ typedef struct {
void census_record_values(census_context *context, census_value *values,
size_t nvalues);
-/** Structure used to describe an aggregation type. */
-typedef struct {
- /* Create a new aggregation. The pointer returned can be used in future calls
- to clone(), free(), record(), data() and reset(). */
- void *(*create)(const void *create_arg);
- /* Make a copy of an aggregation created by create() */
- void *(*clone)(const void *aggregation);
- /* Destroy an aggregation created by create() */
- void (*free)(void *aggregation);
- /* Record a new value against aggregation. */
- void (*record)(void *aggregation, double value);
- /* Return current aggregation data. The caller must cast this object into
- the correct type for the aggregation result. The object returned can be
- freed by using free_data(). */
- void *(*data)(const void *aggregation);
- /* free data returned by data() */
- void (*free_data)(void *data);
- /* Reset an aggregation to default (zero) values. */
- void (*reset)(void *aggregation);
- /* Merge 'from' aggregation into 'to'. Both aggregations must be compatible */
- void (*merge)(void *to, const void *from);
- /* Fill buffer with printable string version of aggregation contents. For
- debugging only. Returns the number of bytes added to buffer (a value == n
- implies the buffer was of insufficient size). */
- size_t (*print)(const void *aggregation, char *buffer, size_t n);
-} census_aggregation_ops;
-
-/* Predefined aggregation types. */
+/** Type representing a particular aggregation */
+typedef struct census_aggregation_ops census_aggregation_ops;
+
+/* Predefined aggregation types, for use with census_view_create(). */
extern census_aggregation_ops census_agg_sum;
extern census_aggregation_ops census_agg_distribution;
extern census_aggregation_ops census_agg_histogram;