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

Add 'hosts' field to NATS 'router.start' message #3

Merged
merged 1 commit into from
Mar 6, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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