Code

Removed sdb_store_fetch_timeseries from headers; it's gone.
[sysdb.git] / src / include / core / store.h
index 0cee91362998d55c4f329c031572d5096e68400c..818297fddb2580ecfd4eeeae8352cb41a6087d0a 100644 (file)
@@ -121,6 +121,7 @@ typedef struct {
        const char * const *backends;
        size_t backends_num;
 } sdb_store_host_t;
+#define SDB_STORE_HOST_INIT { NULL, 0, 0, NULL, 0 }
 
 /*
  * sdb_store_service_t represents the meta-data of a stored service object.
@@ -134,6 +135,7 @@ typedef struct {
        const char * const *backends;
        size_t backends_num;
 } sdb_store_service_t;
+#define SDB_STORE_SERVICE_INIT { NULL, NULL, 0, 0, NULL, 0 }
 
 /*
  * sdb_metric_store_t specifies how to access a metric's data.
@@ -159,6 +161,7 @@ typedef struct {
        const char * const *backends;
        size_t backends_num;
 } sdb_store_metric_t;
+#define SDB_STORE_METRIC_INIT { NULL, NULL, { NULL, NULL }, 0, 0, NULL, 0 }
 
 /*
  * sdb_store_attribute_t represents a stored attribute.
@@ -175,6 +178,7 @@ typedef struct {
        const char * const *backends;
        size_t backends_num;
 } sdb_store_attribute_t;
+#define SDB_STORE_ATTRIBUTE_INIT { NULL, 0, NULL, NULL, SDB_DATA_INIT, 0, 0, NULL, 0 }
 
 /*
  * Expressions represent arithmetic expressions based on stored objects and
@@ -346,21 +350,6 @@ sdb_store_metric_attr(sdb_store_t *store, const char *hostname,
 sdb_store_obj_t *
 sdb_store_get_host(sdb_store_t *store, const char *name);
 
-/*
- * sdb_store_fetch_timeseries:
- * Fetch the time-series described by the specified host's metric and
- * serialize it as JSON into the provided string buffer. The host data is
- * retrieved from the specified store.
- *
- * Returns:
- *  - 0 on success
- *  - a negative value else
- */
-int
-sdb_store_fetch_timeseries(sdb_store_t *store,
-               const char *hostname, const char *metric,
-               sdb_timeseries_opts_t *opts, sdb_strbuf_t *buf);
-
 /*
  * sdb_store_get_child:
  * Retrieve a host's child object of the specified type and name. The