Documentation ¶
Index ¶
- type ConsistentHashing
- func (hash *ConsistentHashing) AddNode(node *Node) error
- func (hash *ConsistentHashing) FindNode(data interface{}) (result *Node)
- func (hash *ConsistentHashing) GetNodes() (result []*Node)
- func (hash *ConsistentHashing) RemoveNode(node *Node)
- func (hash *ConsistentHashing) Search(data interface{}) *Node
- type DHT
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsistentHashing ¶
type ConsistentHashing struct {
// contains filtered or unexported fields
}
ConsistentHashing .
func (*ConsistentHashing) AddNode ¶
func (hash *ConsistentHashing) AddNode(node *Node) error
AddNode .
func (*ConsistentHashing) FindNode ¶
func (hash *ConsistentHashing) FindNode(data interface{}) (result *Node)
FindNode .
func (*ConsistentHashing) GetNodes ¶
func (hash *ConsistentHashing) GetNodes() (result []*Node)
GetNodes .
func (*ConsistentHashing) RemoveNode ¶
func (hash *ConsistentHashing) RemoveNode(node *Node)
RemoveNode .
func (*ConsistentHashing) Search ¶
func (hash *ConsistentHashing) Search(data interface{}) *Node
Search .
type DHT ¶
type DHT interface { Range(begin, end int) *ConsistentHashing List(data ...interface{}) *ConsistentHashing }
DHT Create Consistent Hashing Object
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node .
func (*Node) GetProperty ¶
GetProperty .
func (*Node) SetProperty ¶
SetProperty .
Click to show internal directories.
Click to hide internal directories.