black_box
v1.0.5
Published
micro service library
Downloads
3
Readme
black_box
Micro services library for pull streams
tested on node version 4+
install
npm install black_box
example
var pull = require('pull-stream');
var black_box = require('black_box');
// can get external data in from redis pub sub...
// redis_sub = require('pull-redis-pubsub');
var blackbox = new black_box;
blackbox.add('demo');
blackbox.add('split', 'demo');
blackbox.on('demo', function (data) {
console.log(data);
});
blackbox.on('split', function (data) {
console.log(data);
});
// same as meta.on() but as a pull stream
pull(
meta.tap('demo'),
pull.log()
)
pull (
// redis_sub('cool'), // for redis
pull.values([ { demo: true } ]),
blackbox.pull(),
pull.drain()
)
});