Method: PGPool::CommandLauncher#initialize

Defined in:
lib/pgpool/command_launcher.rb

#initialize(hostname, port, user, password, timeout, options = {}) ⇒ CommandLauncher

Returns a new instance of CommandLauncher.



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/pgpool/command_launcher.rb', line 30

def initialize(hostname, port, user, password, timeout, options = {})
  options = { prefix: DEFAULT_PREFIX }.merge(options)

  @hostname = hostname
  @port     = port
  @user     = user
  @password = password
  @timeout  = timeout

  @pcp_command_options    = "#{@timeout} #{@hostname} #{@port} #{@user} #{@password}"
  @pcp_node_count_command = "#{File.join(options[:prefix], PCP_NODE_COUNT_EXE)} #{@pcp_command_options}"
  @pcp_node_info_command  = "#{File.join(options[:prefix], PCP_NODE_INFO_EXE)} #{@pcp_command_options}"

  self
end