Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidGroupIndex = errors.New("invalid group index")
)
storage errors
Functions ¶
func MaxPeerStorageLen ¶
func MaxPeerStorageLen() int
MaxPeerStorageLen is returns the maximum number of connections allowed.
Types ¶
type PeerStorage ¶
type PeerStorage interface { Add(peer peermessage.ConnectInfo, scoreFunc Score) bool Have(addr string) bool NotEnoughPeer() bool }
PeerStorage is a list of functions to be exposed to external sources.
func NewPeerStorage ¶
func NewPeerStorage(isClose IsClose) PeerStorage
NewPeerStorage is the PeerStorage creator.
Click to show internal directories.
Click to hide internal directories.