Comparing version
@@ -5,2 +5,3 @@ 'use strict'; | ||
var ServerError = require('./server-error'); | ||
var debug = require('debug')('bograch'); | ||
@@ -31,2 +32,3 @@ var DEFAULT_TTL = 5 * 1000; // 5 sec. | ||
transport.connect(function () { | ||
debug('connected transport for %s client', this._name); | ||
this.call('methodList', function (err, methods) { | ||
@@ -92,2 +94,3 @@ if (err) { | ||
killed = true; | ||
debug('resonse timed out for method %s', publicMethodName); | ||
cb(new ServerError('responseTimeout', | ||
@@ -98,2 +101,3 @@ 'Method execution exceeded the time limit of `' + this._ttl + '`')); | ||
debug('calling %s with args %j', publicMethodName, args); | ||
this._transport.call(publicMethodName, args, function () { | ||
@@ -100,0 +104,0 @@ if (!killed && cb) { |
'use strict'; | ||
var createPublicMethodName = require('./create-method-name'); | ||
var debug = require('debug')('bograch'); | ||
@@ -47,2 +48,4 @@ function Server(transport, options) { | ||
debug('executing %s with arguments %j', publicMethodName, args); | ||
try { | ||
@@ -72,2 +75,3 @@ method.apply({}, args); | ||
if (!err) { | ||
debug('started transport for %s server', this._name); | ||
this._isUp = true; | ||
@@ -74,0 +78,0 @@ } |
{ | ||
"name": "bograch", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "A communication gateway for NodeJS microservices.", | ||
@@ -25,3 +25,5 @@ "main": "./lib", | ||
}, | ||
"dependencies": {} | ||
"dependencies": { | ||
"debug": "^2.1.3" | ||
} | ||
} |
112043
79.49%20
5.26%530
1.34%1
Infinity%+ Added
+ Added
+ Added