Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIsBanAddress = errors.New("is ban address") ErrIsAlreadyConnected = errors.New("is already connected") )
router error list
View Source
var (
ErrNotFoundPeer = errors.New("not found peer")
)
peer errors
Functions ¶
This section is empty.
Types ¶
type BanAlways ¶
BanAlways implements sort.Interface for []BanPeerInfo on the Timeout field.
func NewBanAlways ¶
func NewBanAlways() *BanAlways
type Manager ¶
type Manager interface { NewNode(addr string, hash string, ping time.Duration) error AddPeerList(ips []string, hashs []string) GetPeerList() (ips []string, hashs []string) RemovePeer(hash string) Ban(hash string) Unban(Hash string) }
Manager manages peer-connected networks.
func NewNodePoolManage ¶
func NewNodePoolManage(StorePath string, nodeMesh nodeMesh, pubhash common.PublicHash) (Manager, error)
NewNodePoolManage is the peerManager creator. Apply messages necessary for peer management.
Click to show internal directories.
Click to hide internal directories.