1.1.1 • Published 8 years ago

bigcluster v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

bigcluster

NPM Version NPM Downloads

Node.js Smart cluster framwork NodeJS

Installation

$ npm install bigcluster

Usage

var bigcluster = require('bigcluster');

bigcluster(0, function(workid) {
    console.log("work id: ", workid);
}, function(workcount) {
    console.log("work count: ", workcount);
});

Parameters

NameTypeDescriptionRequirement
countintrequired work countY
onWorkerfunctionthe worker processorY
onMasterfunctionthe master processorN

About count:

ValueDescription
-1 or <0workcount = 1, disable cluster mode.
0workcount = cpu count, auto restart exited worker.
>0workcount = count, auto restart exited worker.

License

MIT

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago