algo

package
v0.15.12 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAlgorithm

func NewAlgorithm(opts placement.Options) placement.Algorithm

NewAlgorithm returns a placement algorithm with given options

Types

type PlacementHelper

type PlacementHelper interface {
	// Instances returns the list of instances managed by the PlacementHelper.
	Instances() []placement.Instance

	// CanMoveShard checks if the shard can be moved from the instance to the target isolation group.
	CanMoveShard(shard uint32, fromInstance placement.Instance, toIsolationGroup string) bool
}

PlacementHelper helps the algorithm to place shards.

func NewPlacementHelper

func NewPlacementHelper(p placement.Placement, opts placement.Options) PlacementHelper

NewPlacementHelper returns a placement helper

Jump to

Keyboard shortcuts

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