module DCell::Directory

Directory of nodes connected to the DCell cluster

Public Instance Methods

[](node_id)
Alias for: get
[]=(node_id, addr)
Alias for: set
all() click to toggle source

List all of the node IDs in the directory

# File lib/dcell/directory.rb, line 19
def all
  DCell.registry.nodes
end
clear_all() click to toggle source
# File lib/dcell/directory.rb, line 23
def clear_all
  DCell.registry.clear_all_nodes
end
get(node_id) click to toggle source

Get the URL for a particular Node ID

# File lib/dcell/directory.rb, line 7
def get(node_id)
  DCell.registry.get_node node_id
end
Also aliased as: []
remove(node) click to toggle source
# File lib/dcell/directory.rb, line 27
def remove(node)
  DCell.registry.remove_node node
end
set(node_id, addr) click to toggle source

Set the address of a particular Node ID

# File lib/dcell/directory.rb, line 13
def set(node_id, addr)
  DCell.registry.set_node node_id, addr
end
Also aliased as: []=