Class: Envoy::Client::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/envoy/client/command.rb

Instance Method Summary collapse

Instance Method Details

#run(args) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/envoy/client/command.rb', line 7

def run (args)
  EM.run do
    Envoy.verbosity = Envoy::INFO
    stopper = proc { $exiting = true; EventMachine.stop }
    Signal.trap("INT", stopper)
    Signal.trap("TERM", stopper)
    Envoy.log(Envoy::DEBUG, "envoy #{Envoy::VERSION} starting up")
    config = Envoy::Client::Config.new
    config.parse_options
    config.parse_envoyfile
    config.infer_sane_defaults
    config.start_service
    Envoy::Client::Trunk.start config
  end
end