summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-08-13 01:20:55 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2017-08-13 01:30:18 -0600
commit0af3afe5122636a133818418df12db2bec9d4ecf (patch)
tree3d6d0ffbd57a29ff4074442acfa544acadd66b94
parent0965a1b694b8312c89ca02f64f3c14875db44cf8 (diff)
docs: document the RrdDataSource interface
-rw-r--r--jarmon/jarmon.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js
index 126671e..eec6f2a 100644
--- a/jarmon/jarmon.js
+++ b/jarmon/jarmon.js
@@ -27,6 +27,22 @@ if(typeof(jarmon) === 'undefined') {
}
/**
+ * 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
* @return {module:jQuery.Deferred} A Deferred which will callback with an
@@ -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