Cluster related functions.
Example
var clusterLib = require('/lib/xp/cluster');
Methods
(static) isMaster() → {boolean}
Tests whether the current node is the master node in the cluster.
Returns:
true if the current node is master; false otherwise.
- Type
- boolean
Example
// Initialize data only on the master node
if (clusterLib.isMaster()) {
initializeRepo();
}