class Riak::Client::Node
Constants
- ERRORS_DECAY_RATE
For a score which halves in 10 seconds, choose ln(1/2)/10
- VALID_OPTIONS
Attributes
error_rate[R]
A Decaying
rate of errors.
host[RW]
What IP address or hostname does this node listen on?
pb_port[RW]
Which port does the protocol buffers interface listen on?
Public Class Methods
new(client, opts = {})
click to toggle source
# File lib/riak/client/node.rb, line 24 def initialize(client, opts = {}) @client = client @host = opts[:host] || "127.0.0.1" @pb_port = opts[:pb_port] || 8087 @error_rate = Decaying.new end
Public Instance Methods
==(o)
click to toggle source
# File lib/riak/client/node.rb, line 32 def ==(o) o.kind_of? Node and @host == o.host and @pb_port == o.pb_port end
inspect()
click to toggle source
# File lib/riak/client/node.rb, line 44 def inspect "#<Node #{@host}:#{@pb_port}>" end
protobuffs?()
click to toggle source
Can this node be used for protocol buffers requests?
# File lib/riak/client/node.rb, line 39 def protobuffs? # TODO: Need to sort out capabilities true end