presidium-db-client-server 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DatabaseLoadBalancer.js +4 -4
- package/package.json +1 -1
package/DatabaseLoadBalancer.js
CHANGED
|
@@ -10,7 +10,7 @@ const notFoundHandler = require("./notFoundHandler")
|
|
|
10
10
|
const errorHandler = require("./errorHandler")
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* @name
|
|
13
|
+
* @name DatabaseLoadBalancer
|
|
14
14
|
*
|
|
15
15
|
* @docs
|
|
16
16
|
* ```specscript
|
|
@@ -18,7 +18,7 @@ const errorHandler = require("./errorHandler")
|
|
|
18
18
|
*
|
|
19
19
|
* HTTP.Handler(HTTP.Request, HTTP.Response) -> ()
|
|
20
20
|
*
|
|
21
|
-
* new
|
|
21
|
+
* new DatabaseLoadBalancer(
|
|
22
22
|
* hash(tableName string, key string, length number) -> Promise|number,
|
|
23
23
|
* options {
|
|
24
24
|
* serverIps: Array<string>|Array<Array<string>>,
|
|
@@ -27,7 +27,7 @@ const errorHandler = require("./errorHandler")
|
|
|
27
27
|
* )
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
class
|
|
30
|
+
class DatabaseLoadBalancer {
|
|
31
31
|
constructor(hash, options, ...handlers) {
|
|
32
32
|
this.hash = hash
|
|
33
33
|
this.serverIps = options.serverIps
|
|
@@ -94,4 +94,4 @@ class DatabaseLoadbalancer {
|
|
|
94
94
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
module.exports =
|
|
97
|
+
module.exports = DatabaseLoadBalancer
|