From 0af3afe5122636a133818418df12db2bec9d4ecf Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 13 Aug 2017 01:20:55 -0600 Subject: docs: document the RrdDataSource interface --- jarmon/jarmon.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js index 126671e..eec6f2a 100644 --- a/jarmon/jarmon.js +++ b/jarmon/jarmon.js @@ -26,6 +26,22 @@ if(typeof(jarmon) === 'undefined') { var jarmon = {}; } +/** + * An RrdDataSource is an object that provides a getData method that retrieves + * the data for a single Data Source. + * + * @interface jarmon.RrdDataSource + */ + +/** + * @function + * @name jarmon.RrdDataSource#getData + * @param startTime {number} The start timestamp + * @param endTime {number} The end timestamp + * @return {module:jQuery.Deferred} A Deferred which calls back with a Flot data + * series. + */ + /** * @callback jarmon.RrdQueryRemote.Downloader * @param url {string} The url of the object to be downloaded @@ -286,6 +302,7 @@ jarmon.RrdQuery.prototype.getDSNames = function() { * * @constructor * @requires javascriptRRD/rrdFile + * @implements {jarmon.RrdDataSource} * * @param url {string} The url of a remote RRD file * @param unit {string} The unit suffix of this data eg 'bit/sec' @@ -402,9 +419,11 @@ jarmon.RrdQueryRemote.prototype.getDSNames = function() { /** * Wraps RrdQueryRemote to provide access to a different RRD DSs within a - * single RrdDataSource. + * single {@link jarmon.RrdQueryRemote}. * * @constructor + * @implements {jarmon.RrdDataSource} + * * @param rrdQuery {jarmon.RrdQueryRemote} An RrdQueryRemote instance * @param dsId {(string|number)} identifier of the RRD datasource (string or number) * @param {function} [transformer=function(v){return v}] A callable which -- cgit v1.2.3