Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoHealthyNodeAvailable = errors.New("No healthy node available in the cluster")
)
Functions ¶
func ApplyFilters ¶
func ApplyFilters(filters []Filter, config *dockerclient.ContainerConfig, nodes []*cluster.Node) ([]*cluster.Node, error)
Apply a set of filters in batch.
Types ¶
type Filter ¶
type Filter interface { // Return a subset of nodes that were accepted by the filtering policy. Filter(*dockerclient.ContainerConfig, []*cluster.Node) ([]*cluster.Node, error) }
type HealthFilter ¶
type HealthFilter struct { }
HealthFilter only schedules containers on healthy nodes.
func (*HealthFilter) Filter ¶
func (f *HealthFilter) Filter(config *dockerclient.ContainerConfig, nodes []*cluster.Node) ([]*cluster.Node, error)
type LabelFilter ¶
type LabelFilter struct { }
LabelFilter selects only nodes that match certain labels.
func (*LabelFilter) Filter ¶
func (f *LabelFilter) Filter(config *dockerclient.ContainerConfig, nodes []*cluster.Node) ([]*cluster.Node, error)
type PortFilter ¶
type PortFilter struct { }
PortFilter guarantees that, when scheduling a container binding a public port, only nodes that have not already allocated that same port will be considered.
func (*PortFilter) Filter ¶
func (p *PortFilter) Filter(config *dockerclient.ContainerConfig, nodes []*cluster.Node) ([]*cluster.Node, error)
Click to show internal directories.
Click to hide internal directories.