Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3 from mheath/master
Browse files Browse the repository at this point in the history
Add 'hosts' field to NATS 'router.start' message
  • Loading branch information
pietern committed Mar 6, 2013
2 parents b5110ef + b4a3066 commit 73fe6d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@

# Register ourselves with the system
status_config = config['status'] || {}
local_ip = VCAP.local_ip(config['local_route'])
VCAP::Component.register(:type => 'Router',
:host => VCAP.local_ip(config['local_route']),
:host => local_ip,
:index => config['index'],
:config => config,
:port => status_config['port'],
Expand All @@ -172,7 +173,7 @@
VCAP::Component.varz[:tags] = {}

@router_id = VCAP.secure_uuid
@hello_message = { :id => @router_id, :version => Router::VERSION }.to_json.freeze
@hello_message = { :id => @router_id, :version => Router::VERSION, :hosts => [local_ip] }.to_json.freeze

# This will check on the state of the registered urls, do maintenance, etc..
Router.setup_sweepers
Expand Down

0 comments on commit 73fe6d0

Please sign in to comment.