strategy

package
v0.1.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoResourcesAvailable = errors.New("no resources available to schedule container")
)
View Source
var (
	ErrNotSupported = errors.New("strategy not supported")
)

Functions

This section is empty.

Types

type BinPackingPlacementStrategy

type BinPackingPlacementStrategy struct{}

func (*BinPackingPlacementStrategy) Initialize

func (p *BinPackingPlacementStrategy) Initialize() error

func (*BinPackingPlacementStrategy) PlaceContainer

func (p *BinPackingPlacementStrategy) PlaceContainer(config *dockerclient.ContainerConfig, nodes []*cluster.Node) (*cluster.Node, error)

type PlacementStrategy

type PlacementStrategy interface {
	Initialize() error
	// Given a container configuration and a set of nodes, select the target
	// node where the container should be scheduled.
	PlaceContainer(config *dockerclient.ContainerConfig, nodes []*cluster.Node) (*cluster.Node, error)
}

func New

func New(name string) (PlacementStrategy, error)

type RandomPlacementStrategy

type RandomPlacementStrategy struct{}

Randomly place the container into the cluster.

func (*RandomPlacementStrategy) Initialize

func (p *RandomPlacementStrategy) Initialize() error

func (*RandomPlacementStrategy) PlaceContainer

func (p *RandomPlacementStrategy) PlaceContainer(config *dockerclient.ContainerConfig, nodes []*cluster.Node) (*cluster.Node, error)

Jump to

Keyboard shortcuts

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