algorithms

package
v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0, MIT Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Placer

type Placer interface {
	// Place takes a slice of assignments with entities attached and groups it then updates the assignments with the
	// groups where it will be beneficial to place the entities.
	Place(assignments []*placement.Assignment, groups []*placement.Group, scopeSet *placement.ScopeSet)
}

Placer can create assignments for entities.

func NewPlacer

func NewPlacer(concurrency, minimumSize int) Placer

NewPlacer creates a new placer. If the concurrency is <= 0 then concurrency is disabled no matter, what the concurrency number is set to.

type Relocator

type Relocator interface {
	// Relocate takes a slice of relocation ranks with entities attached and groups, it then updates the relocation
	// ranks with how many other groups that are better to place the entities on.
	Relocate(relocationRanks []*placement.RelocationRank, groups []*placement.Group, scopeSet *placement.ScopeSet)
}

Relocator can create assignments for entities.

func NewRelocator

func NewRelocator(concurrency, minimumSize int) Relocator

NewRelocator creates a new relocator. If the concurrency is <= 0 then concurrency is disabled no matter, what the concurrency number is set to. The minimum size is the minimal number of groups there should be before concurrency is enabled.

Jump to

Keyboard shortcuts

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