Class: Stretcher::Cluster

Inherits:
EsComponent show all
Defined in:
lib/stretcher/cluster.rb

Overview

Represents a cluster of servers should be reached typically through Server#cluster

Instance Method Summary collapse

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, options = {})
  @server = server
  @logger = options[: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(options = {})
  request(:get, 'health', options)
end