summaryrefslogtreecommitdiff
path: root/doc/api/cluster.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/cluster.markdown')
-rw-r--r--doc/api/cluster.markdown18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown
index f5bbafd810..215e48b12a 100644
--- a/doc/api/cluster.markdown
+++ b/doc/api/cluster.markdown
@@ -331,7 +331,7 @@ it is [`kill`][].
### worker.process
-* {ChildProcess object}
+* {ChildProcess}
All workers are created using [`child_process.fork()`][], the returned object
from this function is stored as `.process`. In a worker, the global `process`
@@ -346,7 +346,7 @@ disconnection.
### worker.send(message[, sendHandle][, callback])
* `message` {Object}
-* `sendHandle` {Handle object}
+* `sendHandle` {Handle}
* `callback` {Function}
* Return: Boolean
@@ -394,7 +394,7 @@ worker.kill();
## Event: 'disconnect'
-* `worker` {Worker object}
+* `worker` {cluster.Worker}
Emitted after the worker IPC channel has disconnected. This can occur when a
worker exits gracefully, is killed, or is disconnected manually (such as with
@@ -412,7 +412,7 @@ cluster.on('disconnect', (worker) => {
## Event: 'exit'
-* `worker` {Worker object}
+* `worker` {cluster.Worker}
* `code` {Number} the exit code, if it exited normally.
* `signal` {String} the name of the signal (eg. `'SIGHUP'`) that caused
the process to be killed.
@@ -433,7 +433,7 @@ See [child_process event: 'exit'][].
## Event: 'fork'
-* `worker` {Worker object}
+* `worker` {cluster.Worker}
When a new worker is forked the cluster module will emit a `'fork'` event.
This can be used to log worker activity, and create your own timeout.
@@ -458,7 +458,7 @@ cluster.on('exit', (worker, code, signal) => {
## Event: 'listening'
-* `worker` {Worker object}
+* `worker` {cluster.Worker}
* `address` {Object}
After calling `listen()` from a worker, when the `'listening'` event is emitted on
@@ -485,7 +485,7 @@ The `addressType` is one of:
## Event: 'message'
-* `worker` {Worker object}
+* `worker` {cluster.Worker}
* `message` {Object}
Emitted when any worker receives a message.
@@ -494,7 +494,7 @@ See [child_process event: 'message'][].
## Event: 'online'
-* `worker` {Worker object}
+* `worker` {cluster.Worker}
After forking a new worker, the worker should respond with an online message.
When the master receives an online message it will emit this event.
@@ -536,7 +536,7 @@ This can only be called from the master process.
## cluster.fork([env])
* `env` {Object} Key/value pairs to add to worker process environment.
-* return {Worker object}
+* return {cluster.Worker}
Spawn a new worker process.