Method: KSConnect::API::Plugin::Domain#initialize

Defined in:
lib/ksconnect/api/plugin/domain.rb

#initialize(name, ip_address, plugin_name) ⇒ Domain

Returns a new instance of Domain.



14
15
16
17
18
19
20
21
22
23
# File 'lib/ksconnect/api/plugin/domain.rb', line 14

def initialize(name, ip_address, plugin_name)
  @name = name
  @ip_address = ip_address
  @plugin_name = plugin_name
  @data = Data.new(plugin_name, name, type: :data)
  @private_data = Data.new(plugin_name, name, type: :private_data, auto_notify: true)

  Redis.current ||= Redis.new(driver: :hiredis)
  $redis ||= ConnectionPool.new(size: MAX_THREADS, timeout: 8) { Redis.current }
end