package constraint
import "github.com/moby/swarmkit/v2/manager/constraint"
Index ¶
Constants ¶
const ( // NodeLabelPrefix is the constraint key prefix for node labels. NodeLabelPrefix = "node.labels." // EngineLabelPrefix is the constraint key prefix for engine labels. EngineLabelPrefix = "engine.labels." )
Functions ¶
func NodeMatches ¶
func NodeMatches(constraints []Constraint, n *api.Node) bool
NodeMatches returns true if the node satisfies the given constraints.
Types ¶
type Constraint ¶
type Constraint struct {
// contains filtered or unexported fields
}
Constraint defines a constraint.
func Parse ¶
func Parse(env []string) ([]Constraint, error)
Parse parses list of constraints.
func (*Constraint) Match ¶
func (c *Constraint) Match(whats ...string) bool
Match checks if the Constraint matches the target strings.
Source Files ¶
- Version
- v2.0.0-20250103191802-8c1959736554 (latest)
- Published
- Jan 3, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 1 week ago –
Tools for package owners.