class Protobuf::Rpc::Connectors::Base
Attributes
complete_cb[RW]
failure_cb[RW]
options[R]
success_cb[RW]
Public Class Methods
new(options)
click to toggle source
# File lib/protobuf/rpc/connectors/base.rb, line 31 def initialize(options) @options = DEFAULT_OPTIONS.merge(options) @stats = ::Protobuf::Rpc::Stat.new(:CLIENT) end
Public Instance Methods
first_alive_load_balance?()
click to toggle source
# File lib/protobuf/rpc/connectors/base.rb, line 36 def first_alive_load_balance? ENV.key?("PB_FIRST_ALIVE_LOAD_BALANCE") || options[:first_alive_load_balance] end
ping_port()
click to toggle source
# File lib/protobuf/rpc/connectors/base.rb, line 45 def ping_port @ping_port ||= ENV["PB_RPC_PING_PORT"] end
ping_port_enabled?()
click to toggle source
# File lib/protobuf/rpc/connectors/base.rb, line 49 def ping_port_enabled? ENV.key?("PB_RPC_PING_PORT") end
send_request()
click to toggle source
# File lib/protobuf/rpc/connectors/base.rb, line 41 def send_request fail 'If you inherit a Connector from Base you must implement send_request' end