Comparing version 1.0.2 to 1.0.3
24
index.js
@@ -7,11 +7,11 @@ | ||
var defaultOptions = { | ||
hosts : [], | ||
disabled_hosts : [], | ||
username : 'root', | ||
password : 'root', | ||
port : 8086, | ||
depreciatedLogging : (process.env.NODE_ENV === undefined || 'development') ? console.log : false, | ||
failoverTimeout : 60000, | ||
requestTimeout : null, | ||
maxRetries : 2 | ||
hosts : [], | ||
disabled_hosts : [], | ||
username : 'root', | ||
password : 'root', | ||
port : 8086, | ||
depreciatedLogging : (process.env.NODE_ENV === undefined || 'development') ? console.log : false, | ||
failoverTimeout : 60000, | ||
requestTimeout : null, | ||
maxRetries : 2 | ||
}; | ||
@@ -21,5 +21,4 @@ | ||
this.options = _.extend(_.clone(defaultOptions), options); | ||
this.options = _.extend(defaultOptions,options); | ||
this.request = new influxRequest({ | ||
@@ -298,2 +297,3 @@ failoverTimeout : this.options.failoverTimeout, | ||
module.exports.parseResult = parseResult; | ||
module.exports.InfluxDB = InfluxDB; | ||
module.exports.InfluxDB = InfluxDB; | ||
module.exports.defaultOptions = defaultOptions; |
{ | ||
"name": "influx", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "InfluxDB Client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,2 +12,5 @@ # node-influx | ||
[![Bountysource](https://www.bountysource.com/badge/issue?issue_id=3370228)](https://www.bountysource.com/issues/3370228-handle-chunked-query-responses?utm_source=3370228&utm_medium=shield&utm_campaign=ISSUE_BADGE) - Reward the contributors for there efforts on upcoming tasks. | ||
## Installation | ||
@@ -21,22 +24,21 @@ | ||
``` | ||
var client = influx( | ||
```js | ||
var client = influx({ | ||
//cluster configuration | ||
hosts : [ | ||
{ | ||
host : 'localhost', | ||
port : 8060 //optional. default 8086 | ||
} | ||
], | ||
// or single-host configuration | ||
host : 'localhost', | ||
port : 8086, // optional, default 8086 | ||
username : 'dbuser', | ||
password : 'f4ncyp4ass', | ||
database : 'my_database' | ||
} | ||
); | ||
//cluster configuration | ||
hosts : [ | ||
{ | ||
host : 'localhost', | ||
port : 8060 //optional. default 8086 | ||
} | ||
], | ||
// or single-host configuration | ||
host : 'localhost', | ||
port : 8086, // optional, default 8086 | ||
username : 'dbuser', | ||
password : 'f4ncyp4ass', | ||
database : 'my_database' | ||
}); | ||
``` | ||
``` | ||
@@ -163,3 +165,3 @@ A list of all configuration values can be found below. | ||
var points = [ {attr : value, time : new Date()}, {attr : value2, time : new Date()}]; | ||
writePoint(seriesName, points, options, callback) { } | ||
writePoints(seriesName, points, options, callback) { } | ||
``` | ||
@@ -166,0 +168,0 @@ |
34268
772
224