Class: Falcon::Command::Supervisor
- Inherits:
 - 
      Samovar::Command
      
        
- Object
 - Samovar::Command
 - Falcon::Command::Supervisor
 
 
- Defined in:
 - lib/falcon/command/supervisor.rb
 
Overview
Implements the `falcon supervisor` command.
Talks to an instance of the supervisor to issue commands and print results.
Defined Under Namespace
Instance Method Summary collapse
- 
  
    
      #call  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Connect to the supervisor and execute the requested command.
 - 
  
    
      #command(value)  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The nested command to execute.
 - 
  
    
      #endpoint  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
The endpoint the supervisor is bound to.
 
Instance Method Details
#call ⇒ Object
Connect to the supervisor and execute the requested command.
      81 82 83 84 85 86 87 88 89  | 
    
      # File 'lib/falcon/command/supervisor.rb', line 81 def call Async do endpoint.connect do |socket| stream = Async::IO::Stream.new(socket) @command.call(stream) end end end  | 
  
#command=(value) ⇒ Object
The nested command to execute.
      70 71 72 73  | 
    
      # File 'lib/falcon/command/supervisor.rb', line 70 nested :command, { 'restart' => Restart, 'metrics' => Metrics, }, default: 'metrics'  | 
  
#endpoint ⇒ Object
The endpoint the supervisor is bound to.
      76 77 78  | 
    
      # File 'lib/falcon/command/supervisor.rb', line 76 def endpoint Async::IO::Endpoint.unix(@options[:path]) end  |