Class: JayAPI::Elasticsearch::Stats::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/jay_api/elasticsearch/stats/node.rb,
lib/jay_api/elasticsearch/stats/node/storage.rb

Overview

Holds information about one of the nodes in the Elasticsearch cluster.

Defined Under Namespace

Classes: Storage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, data) ⇒ Node

Returns a new instance of Node.

Parameters:

  • name (String)

    The name of the node.

  • data (Hash)

    Information about the node.



15
16
17
18
# File 'lib/jay_api/elasticsearch/stats/node.rb', line 15

def initialize(name, data)
  @name = name
  @data = data
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/jay_api/elasticsearch/stats/node.rb', line 11

def name
  @name
end

Instance Method Details

#storageJayAPI::Elasticsearch::Stats::Node::Storage

Returns Storage information about the node.

Returns:

Raises:



24
25
26
# File 'lib/jay_api/elasticsearch/stats/node.rb', line 24

def storage
  @storage ||= ::JayAPI::Elasticsearch::Stats::Node::Storage.new(fs_totals)
end