Documentation ¶
Index ¶
- func AppendToList(n *node.Node)
- func AppendToTable(datfile string, n *node.Node)
- func AppendToTableTX(tx *bolt.Tx, datfile string, n *node.Node)
- func Get(datfile string, def node.Slice) node.Slice
- func GetNodestrSlice() []string
- func GetNodestrSliceInList() []string
- func GetNodestrSliceInTable(datfile string) []string
- func Initialize(allnodes node.Slice)
- func Join(n *node.Node) bool
- func ListLen() int
- func NodeLen() int
- func NodesForGet(datfile string, searchDepth int) node.Slice
- func Random(exclude node.Slice, num int) []*node.Node
- func RemoveFromAllTable(n *node.Node) bool
- func RemoveFromList(n *node.Node) bool
- func RemoveFromTable(datfile string, n *node.Node) bool
- func ReplaceNodeInList(n *node.Node) *node.Node
- func TellUpdate(datfile string, stamp int64, id string, n *node.Node)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToList ¶ added in v0.2.0
AppendToList add node n to nodelist if it is allowd and list doesn't have it.
func AppendToTable ¶
AppendToTable add node n to table if it is allowd and list doesn't have it.
func AppendToTableTX ¶ added in v0.2.0
AppendToTableTX add node n to table if it is allowd and list doesn't have it.
func GetNodestrSlice ¶
func GetNodestrSlice() []string
GetNodestrSlice returns Nodestr of all nodes.
func GetNodestrSliceInList ¶ added in v0.2.0
func GetNodestrSliceInList() []string
GetNodestrSliceInList returns Nodestr slice of nodes in list.
func GetNodestrSliceInTable ¶
GetNodestrSliceInTable returns Nodestr slice of nodes associated datfile thread.
func Initialize ¶
Initialize pings one of initNode except myself and added it if success, and get another node info from each nodes in nodelist.
func Join ¶
Join tells n to join and adds n to nodelist if welcomed. if n returns another nodes, repeats it and return true.. removes fron nodelist if not welcomed and return false.
func NodesForGet ¶
NodesForGet returns nodes which has datfile cache , and that extends nodes to #searchDepth .
func RemoveFromAllTable ¶
RemoveFromAllTable removes node n from all tables and return true if exists. or returns false if not exists.
func RemoveFromList ¶
RemoveFromList removes node n from nodelist and return true if exists. or returns false if not exists.
func RemoveFromTable ¶
RemoveFromTable removes node n and return true if exists. or returns false if not exists.
func ReplaceNodeInList ¶
ReplaceNodeInList removes one node and say bye to the node and add n in nodelist. if len(node)>defaultnode
Types ¶
This section is empty.