Module: DCell::Directory
Overview
Directory of nodes connected to the DCell cluster
Instance Method Summary collapse
-
#all ⇒ Object
List all of the node IDs in the directory.
- #clear_all ⇒ Object
-
#get(node_id) ⇒ Object
(also: #[])
Get the URL for a particular Node ID.
- #remove(node) ⇒ Object
-
#set(node_id, addr) ⇒ Object
(also: #[]=)
Set the address of a particular Node ID.
Instance Method Details
#all ⇒ Object
List all of the node IDs in the directory
19 20 21 |
# File 'lib/dcell/directory.rb', line 19 def all DCell.registry.nodes end |
#clear_all ⇒ Object
23 24 25 |
# File 'lib/dcell/directory.rb', line 23 def clear_all DCell.registry.clear_all_nodes end |
#get(node_id) ⇒ Object Also known as: []
Get the URL for a particular Node ID
7 8 9 |
# File 'lib/dcell/directory.rb', line 7 def get(node_id) DCell.registry.get_node node_id end |