Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultAlgorithm is a rule-based scheduling algorithm. DefaultAlgorithm = "default" // PluginAlgorithm is a scheduling algorithm based on plugin extension. PluginAlgorithm = "plugin" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evaluator ¶
type Evaluator interface {
// EvaluateParents sorts and returns a list of parent peers ordered by their suitability as download sources.
// Parents are ranked from best to worst based on a comprehensive multi-dimensional evaluation.
EvaluateParents(parents []*standard.Peer, child *standard.Peer) []*standard.Peer
// IsBadParent determines whether a peer is unsuitable to be selected as a parent
// for downloading pieces.
IsBadParent(peer *standard.Peer) bool
// EvaluatePersistentParents sorts and returns a list of parent peers ordered by their suitability as download sources.
// Parents are ranked from best to worst based on a comprehensive multi-dimensional evaluation.
EvaluatePersistentParents(parents []*persistent.Peer, child *persistent.Peer) []*persistent.Peer
// IsBadPersistentParent determines whether a peer is unsuitable to be selected as a persistent parent
// for downloading pieces.
IsBadPersistentParent(peer *persistent.Peer) bool
// EvaluatePersistentCacheParents sorts and returns a list of parent peers ordered by their suitability as download sources.
// Parents are ranked from best to worst based on a comprehensive multi-dimensional evaluation.
EvaluatePersistentCacheParents(parents []*persistentcache.Peer, child *persistentcache.Peer) []*persistentcache.Peer
// IsBadPersistentCacheParent determines whether a peer is unsuitable to be selected as a persistent cache parent
// for downloading pieces.
IsBadPersistentCacheParent(peer *persistentcache.Peer) bool
}
Evaluator is an interface that evaluates the parents.
func LoadPlugin ¶
Click to show internal directories.
Click to hide internal directories.