Class: GroongaQueryLog::ServerVerifier::GroongaOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/groonga-query-log/server-verifier.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGroongaOptions

Returns a new instance of GroongaOptions.



430
431
432
433
434
435
# File 'lib/groonga-query-log/server-verifier.rb', line 430

def initialize
  @host         = "127.0.0.1"
  @port         = 10041
  @protocol     = :gqtp
  @read_timeout = Groonga::Client::Default::READ_TIMEOUT
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



426
427
428
# File 'lib/groonga-query-log/server-verifier.rb', line 426

def host
  @host
end

#portObject

Returns the value of attribute port.



427
428
429
# File 'lib/groonga-query-log/server-verifier.rb', line 427

def port
  @port
end

#protocolObject

Returns the value of attribute protocol.



428
429
430
# File 'lib/groonga-query-log/server-verifier.rb', line 428

def protocol
  @protocol
end

#read_timeoutObject

Returns the value of attribute read_timeout.



429
430
431
# File 'lib/groonga-query-log/server-verifier.rb', line 429

def read_timeout
  @read_timeout
end

Instance Method Details

#create_client(&block) ⇒ Object



437
438
439
440
441
442
443
# File 'lib/groonga-query-log/server-verifier.rb', line 437

def create_client(&block)
  Groonga::Client.open(:host         => @host,
                       :port         => @port,
                       :protocol     => @protocol,
                       :read_timeout => @read_timeout,
                       &block)
end