Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotSupported = errors.New("strategy not supported") ErrNoResourcesAvailable = errors.New("no resources available to schedule container") )
Functions ¶
This section is empty.
Types ¶
type BinpackPlacementStrategy ¶ added in v0.2.0
type BinpackPlacementStrategy struct { }
func (*BinpackPlacementStrategy) Initialize ¶ added in v0.2.0
func (p *BinpackPlacementStrategy) Initialize() error
func (*BinpackPlacementStrategy) PlaceContainer ¶ added in v0.2.0
func (p *BinpackPlacementStrategy) 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)
type SpreadPlacementStrategy ¶ added in v0.2.0
type SpreadPlacementStrategy struct { }
func (*SpreadPlacementStrategy) Initialize ¶ added in v0.2.0
func (p *SpreadPlacementStrategy) Initialize() error
func (*SpreadPlacementStrategy) PlaceContainer ¶ added in v0.2.0
func (p *SpreadPlacementStrategy) PlaceContainer(config *dockerclient.ContainerConfig, nodes []cluster.Node) (cluster.Node, error)
Click to show internal directories.
Click to hide internal directories.