1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

Separate device functionality into plugins.

This commit is contained in:
Simo Kinnunen 2014-03-14 20:18:53 +09:00
parent d61a70fda5
commit 3d20b06f7f
24 changed files with 1277 additions and 700 deletions

View file

@ -0,0 +1,19 @@
var syrup = require('syrup')
var zmq = require('zmq')
var logger = require('../../../util/logger')
module.exports = syrup()
.define(function(options) {
var log = logger.createLogger('device:plugins:push')
// Output
var push = zmq.socket('push')
options.endpoints.push.forEach(function(endpoint) {
log.info('Sending output to %s', endpoint)
push.connect(endpoint)
})
return push
})