Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 27 lines (22 sloc) 0.785 kB
#!/usr/bin/env ruby
home = File.join(File.dirname(__FILE__), '..')
ENV['BUNDLE_GEMFILE'] = "#{home}/Gemfile"
require 'rubygems'
require 'bundler/setup'
require File.join(home, 'lib', 'health_manager')
trap('INT') { NATS.stop { EM.stop }}
trap('SIGTERM') { NATS.stop { EM.stop }}
EM::run do
NATS.start :uri => ENV['NATS_URI'] || 'nats://nats:nats@192.168.24.128:4222' do
config = {
'bulk' => {'host' => ENV['BULK_URL'] || 'api.vcap.me', 'batch_size' => '2'},
}
VCAP::Logging.setup_from_config({'level' => ENV['LOG_LEVEL'] || 'debug'})
prov = HealthManager::BulkBasedExpectedStateProvider.new(config)
prov.each_droplet do |id, droplet|
puts "Droplet #{id}:"
puts droplet.inspect
end
EM.add_timer(5) { EM.stop { NATS.stop } }
end
end
Jump to Line
Something went wrong with that request. Please try again.