Class: master

clusterproxy. master

new master(options)

The interface for the master process.
Parameters:
Name Type Argument Description
options Object <optional>
The options hash.
Properties
Name Type Argument Default Description
logger Logger <optional>
A logger object (conforms to log4js logger interface) to be used on the master.
msgType String <optional>
The value of the `type` field of the messages, it has to match the workers'; so multiple types can be used to support various delegate objects.
delegate Object <optional>
{} The delegate object.
Source:

Methods

connectWorker(worker)

Makes the master listen on worker messages.
Parameters:
Name Type Description
worker cluster.worker A cluster worker (the result of a `cluster.fork()`).
Source:
Returns:
an object with a `disconnectWorker` method.