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,14 @@
var syrup = require('syrup')
var logger = require('../../../util/logger')
var ChannelManager = require('../../../wire/channelmanager')
module.exports = syrup()
.define(function(options, router) {
var log = logger.createLogger('device:plugins:channels')
var channels = new ChannelManager()
channels.on('timeout', function(channel) {
log.info('Channel "%s" timed out', channel)
})
return channels
})