evaluator

package
v2.1.53 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultAlgorithm is a rule-based scheduling algorithm.
	DefaultAlgorithm = "default"

	// NetworkTopologyAlgorithm is a scheduling algorithm based on rules and network topology.
	NetworkTopologyAlgorithm = "nt"

	// MLAlgorithm is a machine learning scheduling algorithm.
	MLAlgorithm = "ml"

	// 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 sort parents by evaluating multiple feature scores.
	EvaluateParents(parents []*resource.Peer, child *resource.Peer, taskPieceCount int32) []*resource.Peer

	// IsBadNode determine if peer is a failed node.
	IsBadNode(peer *resource.Peer) bool
}

Evaluator is an interface that evaluates the parents.

func LoadPlugin

func LoadPlugin(dir string) (Evaluator, error)

func New

func New(algorithm string, pluginDir string, networkTopologyOptions ...NetworkTopologyOption) Evaluator

New returns a new Evaluator.

type NetworkTopologyOption added in v2.1.31

type NetworkTopologyOption func(e *evaluatorNetworkTopology)

NetworkTopologyOption is a functional option for configuring the evaluatorNetworkTopology.

func WithNetworkTopology added in v2.1.31

func WithNetworkTopology(networktopology networktopology.NetworkTopology) NetworkTopologyOption

WithNetworkTopology sets the networkTopology.

Jump to

Keyboard shortcuts

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