sazze/node-pm

View on GitHub
docs/master.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="utf-8">
    <title>node-pm Module: lib/master</title>

    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">

    
    <link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
    
</head>

<body>
<div class="container-fluid">
    <div class="navbar navbar-fixed-top navbar-inverse">
        <div class="navbar-inner">
            <a class="brand" href="index.html">node-pm</a>
            <ul class="nav">
                
                <li class="dropdown">
                    <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b
                        class="caret"></b></a>

                    <ul class="dropdown-menu ">
                        
                        <li>
                            <a href="clusterEvents.html">lib/clusterEvents</a>
                        </li>
                        
                        <li>
                            <a href="Logger.html">lib/Logger</a>
                        </li>
                        
                        <li>
                            <a href="main.html">lib/main</a>
                        </li>
                        
                        <li>
                            <a href="master.html">lib/master</a>
                        </li>
                        
                        <li>
                            <a href="processEvents.html">lib/processEvents</a>
                        </li>
                        

                    </ul>
                </li>
                
                <li class="dropdown">
                    <a href="events.list.html" class="dropdown-toggle" data-toggle="dropdown">Events<b
                        class="caret"></b></a>

                    <ul class="dropdown-menu ">
                        
                        <li>
                            <a href="global.html#event:shutdown">shutdown</a>
                        </li>
                        

                    </ul>
                </li>
                
            </ul>
        </div>
    </div>

    <div class="row-fluid">

        
        <div class="span8">
            
                <div id="main">
                    


    <h1 class="page-title">Module: lib/master</h1>
<section>

<header>
    <h2>
    lib/master
    </h2>
    
</header>

<article>
    <div class="container-overview">
    

    
        
            <div class="description"><p>The master</p></div>
        

        
<dl class="details">
    

    

    

    

    

    
    <dt class="tag-author">Author:</dt>
    <dd class="tag-author">
        <ul>
            <li><a href="mailto:ksmithson@sazze.com">Kevin Smithson</a></li>
        
            <li><a href="mailto:cthayer@sazze.com">Craig Thayer</a></li>
        </ul>
    </dd>
    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="master.js.html">master.js</a>, <a href="master.js.html#sunlight-1-line-17">line 17</a>
    </li></ul></dd>
    

    

    

    
</dl>


        
    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<dt>
    <h4 class="name" id="cleanup"><span class="type-signature">&lt;private, inner> </span>cleanup<span class="signature">()</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    

    
    
    
    
    
    
    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="master.js.html">master.js</a>, <a href="master.js.html#sunlight-1-line-331">line 331</a>
    </li></ul></dd>
    

    

    

    
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="fork"><span class="type-signature">&lt;private, inner> </span>fork<span class="signature">(<span class="optional">number</span>)</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>Fork Workers N times</p>
    </div>
    

    
    
    
    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>number</code></td>
            

            <td class="type">
            
                
<span class="param-type">int</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    cpus.length
                
                </td>
            

            <td class="description last"><p>the number of processes to start</p></td>
        </tr>

    
    </tbody>
</table>

    
    
    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="master.js.html">master.js</a>, <a href="master.js.html#sunlight-1-line-293">line 293</a>
    </li></ul></dd>
    

    

    

    
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="get"><span class="type-signature">&lt;inner> </span>get<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>Get number of workers</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="master.js.html">master.js</a>, <a href="master.js.html#sunlight-1-line-38">line 38</a>
    </li></ul></dd>
    

    

    

    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>


    </dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="get"><span class="type-signature">&lt;inner> </span>get<span class="signature">()</span><span class="type-signature"> &rarr; {*}</span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>get the cluster object</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="master.js.html">master.js</a>, <a href="master.js.html#sunlight-1-line-55">line 55</a>
    </li></ul></dd>
    

    

    

    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>


        
    
    
</dd>

        
            
<dt>
    <h4 class="name" id="lifecycleTimeoutHandler"><span class="type-signature">&lt;private, inner> </span>lifecycleTimeoutHandler<span class="signature">()</span><span class="type-signature"></span></h4>
    
    
</dt>
<dd>
    
    
    <div class="description">
        <p>Called when workers have reached the end of their lifespan</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="master.js.html">master.js</a>, <a href="master.js.html#sunlight-1-line-310">line 310</a>
    </li></ul></dd>
    

    

    

    
</dl>

    
    

    

    
    
    
    
    
    
    
</dd>

        </dl>
    

    

    
</article>

</section>




                </div>

                <div class="clearfix"></div>
                <footer>
                    
                    
        <span class="copyright">
        Sazze, Inc Copyright © 2012-2013
        </span>
                    <br />
                    
        <span class="jsdoc-message">
        Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.1</a>
        on Mon Nov 04 2013 13:17:36 GMT-0800 (PST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
        </span>
                </footer>
            </div>

            
            <div class="span3">
                <div id="toc"></div>
            </div>
            
            <br clear="both">
        </div>

    </div>
    <script src="scripts/sunlight.js"></script>
    <script src="scripts/sunlight.javascript.js"></script>
    <script src="scripts/sunlight-plugin.doclinks.js"></script>
    <script src="scripts/sunlight-plugin.linenumbers.js"></script>
    <script src="scripts/sunlight-plugin.menu.js"></script>
    <script src="scripts/jquery.min.js"></script>
    <script src="scripts/jquery.scrollTo.js"></script>
    <script src="scripts/jquery.localScroll.js"></script>
    <script src="scripts/bootstrap-dropdown.js"></script>
    <script src="scripts/toc.js"></script>


    <script>  Sunlight.highlightAll({lineNumbers:true,  showMenu: true, enableDoclinks :true}); </script>

    <script>
        $( function () {
            $( "#toc" ).toc( {
                selectors   : "h1,h2,h3,h4",
                showAndHide : false,
                scrollTo    : 60
            } );
            $( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
            $( "#main span[id^='toc']" ).addClass( "toc-shim" );

        } );
    </script>

    

</body>
</html>