Code

plugin: Add a new type of timeseries-fetcher plugins.
[sysdb.git] / src / include / core / plugin.h
index 6b5a9f46268b928c4284e5910afe3117f964d25c..5a26c39fb78b10f503667b9060e4d20f01416746 100644 (file)
@@ -240,11 +240,12 @@ sdb_plugin_register_log(const char *name, sdb_plugin_log_cb callback,
                sdb_object_t *user_data);
 
 /*
- * sdb_plugin_register_ts_fetcher:
- * Register a "time-series fetcher" function to be called whenever retrieving
- * a time-series from a data-store. The callback will receive an identifier
- * describing where to retrieve the data from (e.g. a filename or some kind of
- * URL) and options which further describe the query.
+ * sdb_plugin_register_timeseries_fetcher:
+ * Register a "time-series fetcher" to be called whenever retrieving a
+ * time-series from a data-store or information about it. The fetch callback
+ * will receive an identifier describing where to retrieve the data from (e.g.
+ * a filename or some kind of URL) and options which further describe the
+ * query.
  *
  * The name is used literally (without prepending the plugin name) to look up
  * the appropriate fetcher callback.
@@ -258,6 +259,9 @@ sdb_plugin_register_log(const char *name, sdb_plugin_log_cb callback,
 int
 sdb_plugin_register_ts_fetcher(const char *name,
                sdb_plugin_fetch_ts_cb callback, sdb_object_t *user_data);
+int
+sdb_plugin_register_timeseries_fetcher(const char *name,
+               sdb_timeseries_fetcher_t *fetcher, sdb_object_t *user_data);
 
 /*
  * sdb_plugin_register_writer:
@@ -446,7 +450,8 @@ sdb_plugin_fetch_timeseries(const char *type, const char *id,
  *  - a negative value else
  */
 int
-sdb_plugin_query(sdb_ast_node_t *ast, sdb_strbuf_t *buf, sdb_strbuf_t *errbuf);
+sdb_plugin_query(sdb_ast_node_t *ast,
+               sdb_store_writer_t *w, sdb_object_t *wd, sdb_strbuf_t *errbuf);
 
 /*
  * sdb_plugin_store_host, sdb_plugin_store_service, sdb_plugin_store_metric,