Socket
Socket
Sign inDemoInstall

zetta-cluster

Package Overview
Dependencies
23
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    zetta-cluster

Create zetta clusters


Version published
Weekly downloads
10
increased by400%
Maintainers
1
Install size
2.68 MB
Created
Weekly downloads
 

Readme

Source

Zetta Cluster

Crate a cluster of zetta instances using in memory registry.

Install

npm install zetta-cluster

Usage

var cluster = require('zetta-cluster');
var zetta = require('zetta');
var SineWave = require('zetta-sine-wave');
var LED = require('zetta-mock-led');

cluster({ zetta: zetta })
  .server('cloud')
  .server('detroit', [SineWave, LED], ['cloud'])
  .server('san jose', [SineWave, LED], ['cloud'])
  .server('london', [SineWave, LED], ['cloud'])
  .server('bangalore', [SineWave, LED], ['cloud'])
  .on('log', console.log)
  .on('ready', function() {
    // called when all server are connected to all of their peers
    console.log('cluster peers all connected')
  })
  .run(function(err) {
    if (err) {
      console.error(err);
      process.exit(1);
    }
    // called once all peers run zetta.listen()
  });

Licence

MIT

Keywords

FAQs

Last updated on 08 Dec 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc