price

package
v0.0.0-...-5e778ce Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStrategy

func NewStrategy(pricingModel cloudprovider.PricingModel,
	preferredNodeProvider PreferredNodeProvider,
	nodeUnfitness NodeUnfitness,
) expander.Strategy

NewStrategy returns an expansion strategy that picks nodes based on price and preferred node type.

Types

type NodeUnfitness

type NodeUnfitness func(preferredNode, evaluatedNode *apiv1.Node) float64

NodeUnfitness is a function that returns a value that how much the evaluated node is "different" from the preferred node for the cluster. The value should be greater or equal 1 where 1 means that the node is perfect. 10 means that the node is very unfitted, although there is no upper bound on the value of this function.

type PreferredNodeProvider

type PreferredNodeProvider interface {
	// Node returns the preferred node for the cluster
	Node() (*apiv1.Node, error)
}

PreferredNodeProvider provides a node that would be, in-longer run, the most suited to the cluster needs.

Jump to

Keyboard shortcuts

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