-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
79 lines (67 loc) · 2.78 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/**
*
* Package: concurrency.js
* Author: Ganesh B
* Description: npm module to work with concurrency - worker threads and worker processes easily using simple functions and script files
* Install: npm i concurrency.js --save
* Github: https://github.com/ganeshkbhat/concurrency
* npmjs Link: https://www.npmjs.com/package/concurrency.js
* File: index.js
* File Description:
*
*/
/* eslint no-console: 0 */
'use strict';
const { _concurrencyThreads } = require("./src/worker.threads.js");
const { _concurrencyProcesses } = require("./src/worker.process.js");
const { _concurrencyClusters } = require("./src/worker.cluster.js");
const { _concurrencyThreadsAsync } = require("./src/worker.thread.async.js");
const { _concurrencyMultipleThreads } = require("./src/worker.threads.multiple");
const loadbalancerjs = require("./src/worker.loadbalancer.js");
module.exports._concurrencyThreads = _concurrencyThreads;
module.exports._concurrencyProcesses = _concurrencyProcesses;
module.exports._concurrencyClusters = _concurrencyClusters;
module.exports._concurrencyThreadsAsync = _concurrencyThreadsAsync;
module.exports._concurrencyMultipleThreads = _concurrencyMultipleThreads;
module.exports.concurrencyThreads = _concurrencyThreads;
module.exports.concurrencyProcesses = _concurrencyProcesses;
module.exports.concurrencyClusters = _concurrencyClusters;
module.exports.concurrencyThreadsAsync = _concurrencyThreadsAsync;
module.exports.concurrencyMultipleThreads = _concurrencyMultipleThreads;
module.exports.loadbalancer = {
loadbalancer: loadbalancerjs.loadbalancer,
serverutils: loadbalancerjs.serverutils,
algorithms: loadbalancerjs.algorithms,
sockets: loadbalancerjs.sockets,
certificates: loadbalancerjs.certificates,
default: loadbalancerjs.default
};
module.exports.concurrency = {
threads: _concurrencyThreads,
processes: _concurrencyProcesses,
clusters: _concurrencyClusters,
threadsAsync: _concurrencyThreadsAsync,
multipleThreads: _concurrencyMultipleThreads,
}
module.exports.default = {
_concurrencyThreads,
_concurrencyProcesses,
_concurrencyClusters,
_concurrencyThreadsAsync,
_concurrencyMultipleThreads,
concurrencyThreads: _concurrencyThreads,
concurrencyProcesses: _concurrencyProcesses,
concurrencyClusters: _concurrencyClusters,
concurrencyThreadsAsync: _concurrencyThreadsAsync,
concurrencyMultipleThreads: _concurrencyMultipleThreads,
concurrency: {
threads: _concurrencyThreads,
processes: _concurrencyProcesses,
clusters: _concurrencyClusters,
threadsAsync: _concurrencyThreadsAsync,
multipleThreads: _concurrencyMultipleThreads,
},
loadbalancer: {
...loadbalancerjs
}
};