Documentation ¶
Index ¶
Constants ¶
const ( // EQ is exported EQ = iota // NOTEQ is exported NOTEQ )
Variables ¶
var ( // ErrNoHealthyNodeAvailable is exported ErrNoHealthyNodeAvailable = errors.New("No healthy node available in the cluster") )
var ( // ErrNotSupported is exported ErrNotSupported = errors.New("filter not supported") )
var OPERATORS = []string{"==", "!="}
OPERATORS is exported
Functions ¶
Types ¶
type AffinityFilter ¶
type AffinityFilter struct { }
AffinityFilter selects only nodes based on other containers on the node.
func (*AffinityFilter) Filter ¶
func (f *AffinityFilter) Filter(config *cluster.ContainerConfig, nodes []*node.Node, soft bool) ([]*node.Node, error)
Filter is exported
func (*AffinityFilter) Name ¶ added in v0.2.0
func (f *AffinityFilter) Name() string
Name returns the name of the filter
type ConstraintFilter ¶
type ConstraintFilter struct { }
ConstraintFilter selects only nodes that match certain labels.
func (*ConstraintFilter) Filter ¶
func (f *ConstraintFilter) Filter(config *cluster.ContainerConfig, nodes []*node.Node, soft bool) ([]*node.Node, error)
Filter is exported
func (*ConstraintFilter) Name ¶ added in v0.2.0
func (f *ConstraintFilter) Name() string
Name returns the name of the filter
type DependencyFilter ¶
type DependencyFilter struct { }
DependencyFilter co-schedules dependent containers on the same node.
func (*DependencyFilter) Filter ¶
func (f *DependencyFilter) Filter(config *cluster.ContainerConfig, nodes []*node.Node, _ bool) ([]*node.Node, error)
Filter is exported
func (*DependencyFilter) Name ¶ added in v0.2.0
func (f *DependencyFilter) Name() string
Name returns the name of the filter
func (*DependencyFilter) String ¶
func (f *DependencyFilter) String(config *cluster.ContainerConfig) string
Get a string representation of the dependencies found in the container config.
type Filter ¶
type Filter interface { Name() string // Return a subset of nodes that were accepted by the filtering policy. Filter(*cluster.ContainerConfig, []*node.Node, bool) ([]*node.Node, error) }
Filter is exported
type HealthFilter ¶
type HealthFilter struct { }
HealthFilter only schedules containers on healthy nodes.
func (*HealthFilter) Filter ¶
func (f *HealthFilter) Filter(_ *cluster.ContainerConfig, nodes []*node.Node, _ bool) ([]*node.Node, error)
Filter is exported
func (*HealthFilter) Name ¶ added in v0.2.0
func (f *HealthFilter) Name() string
Name returns the name of the filter
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 *cluster.ContainerConfig, nodes []*node.Node, _ bool) ([]*node.Node, error)
Filter is exported
func (*PortFilter) Name ¶ added in v0.2.0
func (p *PortFilter) Name() string
Name returns the name of the filter