Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotSupported is exported ErrNotSupported = errors.New("strategy not supported") // ErrNoResourcesAvailable is exported ErrNoResourcesAvailable = errors.New("no resources available to schedule container") )
Functions ¶
Types ¶
type BinpackPlacementStrategy ¶ added in v0.2.0
type BinpackPlacementStrategy struct { }
BinpackPlacementStrategy is exported
func (*BinpackPlacementStrategy) Initialize ¶ added in v0.2.0
func (p *BinpackPlacementStrategy) Initialize() error
Initialize is exported
func (*BinpackPlacementStrategy) Name ¶ added in v0.2.0
func (p *BinpackPlacementStrategy) Name() string
Name returns the name of the strategy
func (*BinpackPlacementStrategy) PlaceContainer ¶ added in v0.2.0
func (p *BinpackPlacementStrategy) PlaceContainer(config *cluster.ContainerConfig, nodes []*node.Node) (*node.Node, error)
PlaceContainer is exported
type PlacementStrategy ¶
type PlacementStrategy interface { Name() string Initialize() error // Given a container configuration and a set of nodes, select the target // node where the container should be scheduled. PlaceContainer(config *cluster.ContainerConfig, nodes []*node.Node) (*node.Node, error) }
PlacementStrategy is exported
type RandomPlacementStrategy ¶
type RandomPlacementStrategy struct {
// contains filtered or unexported fields
}
RandomPlacementStrategy randomly places the container into the cluster.
func (*RandomPlacementStrategy) Initialize ¶
func (p *RandomPlacementStrategy) Initialize() error
Initialize is exported
func (*RandomPlacementStrategy) Name ¶ added in v0.2.0
func (p *RandomPlacementStrategy) Name() string
Name returns the name of the strategy
func (*RandomPlacementStrategy) PlaceContainer ¶
func (p *RandomPlacementStrategy) PlaceContainer(config *cluster.ContainerConfig, nodes []*node.Node) (*node.Node, error)
PlaceContainer is exported
type SpreadPlacementStrategy ¶ added in v0.2.0
type SpreadPlacementStrategy struct { }
SpreadPlacementStrategy is exported
func (*SpreadPlacementStrategy) Initialize ¶ added in v0.2.0
func (p *SpreadPlacementStrategy) Initialize() error
Initialize is exported
func (*SpreadPlacementStrategy) Name ¶ added in v0.2.0
func (p *SpreadPlacementStrategy) Name() string
Name returns the name of the strategy
func (*SpreadPlacementStrategy) PlaceContainer ¶ added in v0.2.0
func (p *SpreadPlacementStrategy) PlaceContainer(config *cluster.ContainerConfig, nodes []*node.Node) (*node.Node, error)
PlaceContainer is exported
Click to show internal directories.
Click to hide internal directories.