algorithm

package
v0.0.0-...-075ee23 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MatchAlgorithms map[string]MatchAlgorithm
)

Lookup of Algorthms

Functions

func List

func List() map[string]MatchAlgorithm

List returns known algorithms

func Register

func Register(algorithm MatchAlgorithm)

Register a new backend by name

Types

type MatchAlgorithm

type MatchAlgorithm interface {
	Name() string
	Description() string
	Init(map[string]string) error

	// A MatchAlgorithm needs to take a slot and determine if it matches
	CheckSubsystemEdge(slotNeeds *types.MatchAlgorithmNeeds, edge *types.Edge)

	// Graph backends that support cypher need a cypher query for the algorithm
	GenerateCypher(matchNeeds *types.MatchAlgorithmNeeds) string
}

A SelectionAlgorithm is used by the rainbow scheduler to make a final decision about assigning work to a group of clusters.

func Get

func Get(name string) (MatchAlgorithm, error)

Get a backend by name

func GetOrFail

func GetOrFail(name string) MatchAlgorithm

GetOrFail ensures we can find the entry

Jump to

Keyboard shortcuts

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