Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cluster-status

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cluster-status

cluster-status ===============

  • 0.5.0-SNAPSHOT.1387826685226
  • latest
  • v0_5_0-SNAPSHOT
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

cluster-status

A utility to collect status from all workers/master and present as an aggregated view.

This is a helpful piece evolved from the current cluster2, which is to allow applications to easily register status of any interest. It allows each worker to register its own state, master would automatically aggregate all states from active workers. It works nicely with our monitor capability (via debug middleware)

Notice, the status module works in a single process runtime too based on its event driven implementation.

  • register
require('cluster-status')
  .register('status-name',
    function(){
      return 'view';//view function
    },
    function(value){
      //update function
    });
  • statuses
require('cluster-status')
  .statuses(); //return names of registered statuses
  • getStatus
require('cluster-status')
  .getStatus('status-name')
  .then(function(status){
    //got status
  },
  function(error){
    //err
  });
  • setStatus
require('cluster-status')
  .setStatus('status-name',
    'value')
  .then(function(set){
    //set or not
  },
  function(error){
    //err
  });

FAQs

Package last updated on 23 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc