X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Finclude%2Fcore%2Fplugin.h;h=4e5d1046660896bb91bb5759309fda23da448758;hb=f78d30d42f9fe3b58f1c2132cafe4c8687b8bd46;hp=4ccc983c446551db07ec729b4c7b26cfc8161b8b;hpb=c67634d0683a42c1e5457279de98958cbacc679d;p=sysdb.git diff --git a/src/include/core/plugin.h b/src/include/core/plugin.h index 4ccc983..4e5d104 100644 --- a/src/include/core/plugin.h +++ b/src/include/core/plugin.h @@ -373,9 +373,27 @@ sdb_plugin_log(int prio, const char *msg); * Log a formatted message. See sdb_plugin_log for more information. */ int -sdb_plugin_vlogf(int prio, const char *fmt, va_list ap); +sdb_plugin_vlogf(int prio, const char *fmt, va_list ap) + __attribute__((format(printf, 2, 0))); int -sdb_plugin_logf(int prio, const char *fmt, ...); +sdb_plugin_logf(int prio, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); + +/* + * sdb_plugin_fetch_timeseries: + * Fetch the time-series identified by 'id' from a backend data-store of the + * specified 'type'. The type has to match an existing time-series fetcher + * callback's name. The identifier is passed through to the callback which + * then needs to make sense of it. The time-series option specify which data + * to fetch. + * + * Returns: + * - a time-series on success + * - NULL else + */ +sdb_timeseries_t * +sdb_plugin_fetch_timeseries(const char *type, const char *id, + sdb_timeseries_opts_t *opts); #ifdef __cplusplus } /* extern "C" */