network

package
v0.0.0-...-910d698 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSCNInfo

func NewSCNInfo() *scnInfo

Types

type NodeInfo

type NodeInfo struct {
	// contains filtered or unexported fields
}

func NodeInfoInst

func NodeInfoInst() *NodeInfo

func (*NodeInfo) GetLocalddr

func (ni *NodeInfo) GetLocalddr() *dtype.NodeInfo

func (*NodeInfo) GetSimAddr

func (ni *NodeInfo) GetSimAddr() *dtype.NodeInfo

func (*NodeInfo) SetLocalddrIP

func (ni *NodeInfo) SetLocalddrIP(ip string)

func (*NodeInfo) SetLocalddrParam

func (ni *NodeInfo) SetLocalddrParam(mode string, sc int, port int, hash string)

func (*NodeInfo) SetSimAddr

func (ni *NodeInfo) SetSimAddr(ip string, port int)

type NodeMgr

type NodeMgr struct {
	// contains filtered or unexported fields
}

func NodeMgrInst

func NodeMgrInst() *NodeMgr

func (*NodeMgr) AddNSCNNode

func (n *NodeMgr) AddNSCNNode(node dtype.NodeInfo)

func (*NodeMgr) GetSCNNodeListAll

func (n *NodeMgr) GetSCNNodeListAll(nodes *[(config.MAX_SC) * config.MAX_SC_PEER]dtype.NodeInfo)

func (*NodeMgr) GetSCNNodeListbyDistance

func (n *NodeMgr) GetSCNNodeListbyDistance(sc int, oid string, nodes *[config.MAX_SC_PEER]dtype.NodeInfo) bool

func (*NodeMgr) GetTargetList

func (n *NodeMgr) GetTargetList(sc int, nodes *[config.MAX_SC_PEER]dtype.NodeInfo) bool

func (*NodeMgr) SetHttpRouter

func (n *NodeMgr) SetHttpRouter(m *mux.Router)

func (*NodeMgr) UpdatePeerList

func (n *NodeMgr) UpdatePeerList(sim *dtype.NodeInfo, local *dtype.NodeInfo)

Update peers list

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL