Code

core: Introduced the concept of time-series.
[sysdb.git] / src / core / plugin.c
index 919df2b3c982fed934b0495849817936907d9253..85dd76f410dbccfdb27f6bbf9fff3c0ee4653f27 100644 (file)
@@ -118,6 +118,7 @@ static sdb_llist_t      *collector_list = NULL;
 static sdb_llist_t      *cname_list = NULL;
 static sdb_llist_t      *shutdown_list = NULL;
 static sdb_llist_t      *log_list = NULL;
+static sdb_llist_t      *ts_fetcher_list = NULL;
 
 static struct {
        const char   *type;
@@ -786,6 +787,14 @@ sdb_plugin_register_collector(const char *name, sdb_plugin_collector_cb callback
        return 0;
 } /* sdb_plugin_register_collector */
 
+int
+sdb_plugin_register_ts_fetcher(const char *name,
+               sdb_plugin_fetch_ts_cb callback, sdb_object_t *user_data)
+{
+       return plugin_add_callback(&ts_fetcher_list, "time-series fetcher",
+                       name, callback, user_data);
+} /* sdb_plugin_register_ts_fetcher */
+
 sdb_plugin_ctx_t
 sdb_plugin_get_ctx(void)
 {