Navigation Menu

Skip to content

Commit

Permalink
Specify "targetRole" to the envelope (by default "service-provider")
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 28, 2015
1 parent c48eeb9 commit 642eeeb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/droonga-protocol/connection.js
Expand Up @@ -62,6 +62,7 @@ Connection.prototype._init = function() {
this.defaultDataset = process.env.DROONGA_ENGINE_DEFAULT_DATASET ||
this._params.defaultDataset ||
'';
this.defaultTargetRole = 'service-provider';
this.defaultTimeout = this._params.defaultTimeout ||
DEFAULT_RESPONSE_TIMEOUT_SECONDS;
this.hostName = this._params.hostName ||
Expand Down Expand Up @@ -234,6 +235,7 @@ Connection.prototype.emitMessage = function(type, body, callback, options) {
date: getCurrentTime(),
dataset: options.dataset || this.defaultDataset,
type: type,
targetRole: options.targetRole || this.defaultTargetRole,
body: body
};
if (typeof envelope.timeout != 'number') {
Expand Down

0 comments on commit 642eeeb

Please sign in to comment.