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)
Click to show internal directories.
Click to hide internal directories.