lib/algolia/transport/stateful_host.rb in algolia-3.0.0.alpha.6 vs lib/algolia/transport/stateful_host.rb in algolia-3.0.0.alpha.7

- old
+ new

@@ -1,11 +1,11 @@ module Algolia module Transport class StatefulHost include CallType - attr_reader :url, :protocol, :accept + attr_reader :url, :protocol, :accept, :port attr_accessor :last_use, :retry_count, :up # @param url [String] host url # @option options [binary] :accept accept type flag # @option options [DateTime] :last_use last usage date @@ -13,9 +13,10 @@ # @option options [Boolean] :up host status # def initialize(url, opts = {}) @url = url @protocol = opts[:protocol] || 'https://' + @port = opts[:port] @accept = opts[:accept] || (READ | WRITE) @last_use = opts[:last_use] || Time.now.utc @retry_count = opts[:retry_count] || 0 @up = opts.key?(:up) ? opts[:up] : true end