Class: ElasticSearch::TransportBase
- Inherits:
-
Object
- Object
- ElasticSearch::TransportBase
show all
- Defined in:
- lib/elastic_search/transport/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize(hosts, options = {}) ⇒ TransportBase
Returns a new instance of TransportBase.
3
4
5
6
|
# File 'lib/elastic_search/transport/base.rb', line 3
def initialize(hosts, options = {})
@options = options
@connections = hosts.collect { |host| get_connection(host) }
end
|
Instance Method Details
#current_connection ⇒ Object
8
9
10
|
# File 'lib/elastic_search/transport/base.rb', line 8
def current_connection
@connections.sample
end
|
#execute(request) ⇒ Object
12
13
14
|
# File 'lib/elastic_search/transport/base.rb', line 12
def execute(request)
raise NotImplementedError
end
|