Sha256: 7ad8c20b7d039b8ac998970587f5122083969ba1d2b057d11fb2221922a38551

Contents?: true

Size: 1.27 KB

Versions: 10

Compression:

Stored size: 1.27 KB

Contents

require 'celluloid'
require 'yaml'

require_relative 'utils/celluloid_klass'
require_relative 'utils/pmap'

require_relative 'utils/leak_19'
require_relative 'utils/mini_active_support'

# Extend all objects with logger
Object.send(:include, Eye::Logger::ObjectExt)

Eye::Sigar # needs to preload

class Eye::Controller
  include Celluloid

  autoload :Load,           'eye/controller/load'
  autoload :Helpers,        'eye/controller/helpers'
  autoload :Commands,       'eye/controller/commands'
  autoload :Status,         'eye/controller/status'
  autoload :SendCommand,    'eye/controller/send_command'
  autoload :Options,        'eye/controller/options'

  include Eye::Controller::Load
  include Eye::Controller::Helpers
  include Eye::Controller::Commands
  include Eye::Controller::Status
  include Eye::Controller::SendCommand
  include Eye::Controller::Options

  attr_reader :applications, :current_config

  exclusive :load # load is hard command, so better to run it safely blocked

  def initialize
    @applications = []
    @current_config = Eye::Config.new

    Celluloid::logger = Eye::Logger.new('celluloid')
    Eye::SystemResources.cache

    info "starting #{Eye::ABOUT} <#{$$}>"
  end

  def settings
    current_config.settings
  end

  def logger_tag
    'Eye'
  end

end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
ace-eye-0.6.5 lib/eye/controller.rb
ace-eye-0.6.4 lib/eye/controller.rb
eye-0.6.1 lib/eye/controller.rb
ace-eye-0.6.3 lib/eye/controller.rb
ace-eye-0.6.2 lib/eye/controller.rb
ace-eye-0.6.1 lib/eye/controller.rb
eye-0.6 lib/eye/controller.rb
reel-eye-0.5.2.1 lib/eye/controller.rb
reel-eye-0.5.2 lib/eye/controller.rb
eye-0.5.2 lib/eye/controller.rb