###consensus-manager
####consensus wrapper for a distributed topology
The consensus manager listens and stores responses from remote peers until the
consensus is reached. The consensus is reached depending on the strategy
implemented.
The consensus manager controls:
- time it takes to reach consensus
- accepts and stores responses from peers
- notices upper layer when consensus is reached and its output (if any)
The strategy defines:
- when consensus is reached
####installation
sudo npm install consensus-manager
####example
Strategy = require('..')
ConsensusManager = require('ConsensusManager')
var strategy = new Startegy(strategy_opts)
var consensus = new ConsensusManager(strategy)
consensus.on('listening', function(){
})
consensus.on('consensus', function(result, time_diff){
})
consensus.on('noListening', function(){
})
consensus.init
consensus.process(response)