Class: Stretcher::Cluster
- Inherits:
-
EsComponent
- Object
- EsComponent
- Stretcher::Cluster
- Defined in:
- lib/stretcher/cluster.rb
Overview
Represents a cluster of servers should be reached typically through Server#cluster
Instance Method Summary collapse
-
#health(options = {}) ⇒ Object
Get the health of the cluster.
-
#initialize(server, options = {}) ⇒ Cluster
constructor
A new instance of Cluster.
Methods inherited from EsComponent
#do_alias, #do_delete_query, #do_refresh, #do_search, #request
Constructor Details
#initialize(server, options = {}) ⇒ Cluster
Returns a new instance of Cluster.
7 8 9 10 |
# File 'lib/stretcher/cluster.rb', line 7 def initialize(server, = {}) @server = server @logger = [:logger] || server.logger end |
Instance Method Details
#health(options = {}) ⇒ Object
Get the health of the cluster
13 14 15 |
# File 'lib/stretcher/cluster.rb', line 13 def health( = {}) request(:get, 'health', ) end |