Class: Falcon::Controller::Host
- Inherits:
 - 
      Async::Container::Controller
      
        
- Object
 - Async::Container::Controller
 - Falcon::Controller::Host
 
 
- Defined in:
 - lib/falcon/controller/host.rb
 
Overview
A generic controller for serving an application. Hosts several Services based on the command configuration.
The configuration is provided by Falcon::Command::Host and is typically loaded from a `falcon.rb` file. See Falcon::Configuration#load_file for more details.
Instance Method Summary collapse
- 
  
    
      #create_container  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Create the controller as specified by the command.
 - 
  
    
      #initialize(command, **options)  ⇒ Host 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
Initialize the virtual controller.
 - 
  
    
      #setup(container)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Setup all specified services into the container.
 - 
  
    
      #start  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Start all specified services.
 - 
  
    
      #stop  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Stop all specified services.
 
Constructor Details
Instance Method Details
#create_container ⇒ Object
Create the controller as specified by the command. e.g. `Async::Container::Forked`.
      47 48 49  | 
    
      # File 'lib/falcon/controller/host.rb', line 47 def create_container @command.container_class.new end  | 
  
#setup(container) ⇒ Object
Setup all specified services into the container.
      60 61 62  | 
    
      # File 'lib/falcon/controller/host.rb', line 60 def setup(container) @services.setup(container) end  | 
  
#start ⇒ Object
Start all specified services.
      52 53 54 55 56  | 
    
      # File 'lib/falcon/controller/host.rb', line 52 def start @services.start super end  | 
  
#stop ⇒ Object
Stop all specified services.
      65 66 67 68 69  | 
    
      # File 'lib/falcon/controller/host.rb', line 65 def stop(*) @services.stop super end  |