Path: blob/main/third_party/closure-compiler/node-externs/cluster.js
6172 views
/*1* Copyright 2012 The Closure Compiler Authors.2*3* Licensed under the Apache License, Version 2.0 (the "License");4* you may not use this file except in compliance with the License.5* You may obtain a copy of the License at6*7* http://www.apache.org/licenses/LICENSE-2.08*9* Unless required by applicable law or agreed to in writing, software10* distributed under the License is distributed on an "AS IS" BASIS,11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12* See the License for the specific language governing permissions and13* limitations under the License.14*/1516/**17* @fileoverview Definitions for node's cluster module. Depends on the events module.18* @see http://nodejs.org/api/cluster.html19* @see https://github.com/joyent/node/blob/master/lib/cluster.js20* @externs21* @author Daniel Wirtz <[email protected]>22*/2324/**25BEGIN_NODE_INCLUDE26var cluster = require('cluster');27END_NODE_INCLUDE28*/2930/**31* @type events.EventEmitter32*/33var cluster;3435/**36* @typedef {{exec: string, args: Array.<string>, silent: boolean}}37*/38cluster.Settings;3940/**41* @type {cluster.Settings}42*/43cluster.settings;4445/**46* @type {boolean}47*/48cluster.isMaster;4950/**51* @type {boolean}52*/53cluster.isWorker;5455/**56* @param {cluster.Settings=} settings57*/58cluster.setupMaster = function(settings) {};5960/**61* @param {Object.<string,*>} env62* @return {cluster.Worker}63*/64cluster.fork = function(env) {};6566/**67* @param {function()=} callback68*/69cluster.disconnect = function(callback) {};7071/**72* @type {?cluster.Worker}73*/74cluster.worker;7576/**77* @type {?Object.<string,cluster.Worker>}78*/79cluster.workers;8081/**82* @constructor83* @extends events.EventEmitter84*/85cluster.Worker = function() {};8687/**88* @type {string}89*/90cluster.Worker.prototype.id;9192/**93* @type {child_process.ChildProcess}94*/95cluster.Worker.prototype.process;9697/**98* @type {boolean}99*/100cluster.Worker.prototype.suicide;101102/**103* @param {Object} message104* @param {*=} sendHandle105*/106cluster.Worker.prototype.send = function(message, sendHandle) {};107108/**109*/110cluster.Worker.prototype.destroy = function() {};111112/**113*/114cluster.Worker.prototype.disconnect = function() {};115116117