Class: Falcon::Command::Host

Inherits:
Samovar::Command
  • Object
show all
Defined in:
lib/falcon/command/host.rb

Instance Method Summary collapse

Instance Method Details

#callObject



53
54
55
56
57
58
59
60
61
62
# File 'lib/falcon/command/host.rb', line 53

def call
  Async.logger.info(self) do |buffer|
    buffer.puts "Falcon Host v#{VERSION} taking flight!"
    buffer.puts "- Configuration: #{@paths.join(', ')}"
    buffer.puts "- To terminate: Ctrl-C or kill #{Process.pid}"
    buffer.puts "- To reload: kill -HUP #{Process.pid}"
  end
  
  self.controller.run
end

#configuration(verbose = false) ⇒ Object



38
39
40
41
42
43
44
45
46
47
# File 'lib/falcon/command/host.rb', line 38

def configuration(verbose = false)
  configuration = Configuration.new(verbose)
  
  @paths.each do |path|
    path = File.expand_path(path)
    configuration.load_file(path)
  end
  
  return configuration
end

#container_classObject



34
35
36
# File 'lib/falcon/command/host.rb', line 34

def container_class
  Async::Container.best_container_class
end

#controllerObject



49
50
51
# File 'lib/falcon/command/host.rb', line 49

def controller
  Controller::Host.new(self)
end