Documentation ¶
Index ¶
Constants ¶
const ( TabMgrEnoNone = iota TabMgrEnoConfig TabMgrEnoParameter TabMgrEnoScheduler TabMgrEnoDatabase TabMgrEnoNotFound TabMgrEnoDuplicated TabMgrEnoInternal TabMgrEnoFindNodeFailed TabMgrEnoPingpongFailed TabMgrEnoTimeout TabMgrEnoUdp TabMgrEnoResource TabMgrEnoRemove )
errno
const ( TabInstStateNull = iota // null instance state TabInstStateQuering // FindNode sent but had not been responsed yet TabInstStateBonding // Ping sent but hand not been responsed yet TabInstStateQTimeout // query timeout TabInstStateBTimeout // bound timeout )
Instance control block
const ( TabInstQPendingMax = 16 // max nodes in pending for quering TabInstBPendingMax = 128 // max nodes in pending for bounding TabInstQueringMax = 8 // max concurrency quering instances TabInstBondingMax = 64 // max concurrency bonding instances )
const HashBits = HashLength * 8 // bits number of hash
const HashLength = 32 // 32 bytes(256 bits) hash applied
Hash type
const NdbcName = "ndbCleaner"
Static task to keep the node database clean
const TabMgrName = sch.TabMgrName
Table manager
Variables ¶
This section is empty.
Functions ¶
func DecodeBytes ¶
Added by yeeco to remove the reference to Ethereum's rlp
func EncodeToBytes ¶
Added by yeeco to remove the reference to Ethereum's rlp
func NdbcProc ¶
func NdbcProc(ptn interface{}, msg *sch.SchMessage) sch.SchErrno
NodeDb cleaner entry
func TabMgrProc ¶
func TabMgrProc(ptn interface{}, msg *sch.SchMessage) sch.SchErrno
Table manager entry
Types ¶
type Hash ¶
type Hash [HashLength]byte
type Node ¶
func TabClosest ¶
Fetch closest nodes for target Notice: inside the table manager task, this function MUST NOT be called, since we had obtain the lock at the entry of the task handler.
type TabMgrErrno ¶
type TabMgrErrno int
func TabBucketAddNode ¶
Upate node for the bucket Notice: inside the table manager task, this function MUST NOT be called, since we had obtain the lock at the entry of the task handler.
func TabUpdateNode ¶
func TabUpdateNode(umn *um.Node) TabMgrErrno
Upate a node for node database. Notice: inside the table manager task, this function MUST NOT be called, since we had obtain the lock at the entry of the task handler.