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.



517
518
519
520
521
522
# File 'lib/groonga-query-log/server-verifier.rb', line 517

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.



513
514
515
# File 'lib/groonga-query-log/server-verifier.rb', line 513

def host
  @host
end

#portObject

Returns the value of attribute port.



514
515
516
# File 'lib/groonga-query-log/server-verifier.rb', line 514

def port
  @port
end

#protocolObject

Returns the value of attribute protocol.



515
516
517
# File 'lib/groonga-query-log/server-verifier.rb', line 515

def protocol
  @protocol
end

#read_timeoutObject

Returns the value of attribute read_timeout.



516
517
518
# File 'lib/groonga-query-log/server-verifier.rb', line 516

def read_timeout
  @read_timeout
end

Instance Method Details

#create_client(&block) ⇒ Object



524
525
526
527
528
529
530
# File 'lib/groonga-query-log/server-verifier.rb', line 524

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