Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtendedPeerstore ¶
type ExtendedPeerstore interface { peerstore.Peerstore ScoreDatastore peerstore.CertifiedAddrBook }
ExtendedPeerstore defines a type-safe API to work with additional peer metadata based on a libp2p peerstore.Peerstore
func NewExtendedPeerstore ¶
type PeerScores ¶
type PeerScores struct {
Gossip float64
}
type ScoreDatastore ¶
type ScoreDatastore interface { // GetPeerScores returns the current scores for the specified peer GetPeerScores(id peer.ID) (PeerScores, error) // SetScore stores the latest score for the specified peer and score type SetScore(id peer.ID, scoreType ScoreType, score float64) error }
ScoreDatastore defines a type-safe API for getting and setting libp2p peer score information
Click to show internal directories.
Click to hide internal directories.