github.com/maier/nomad@v0.4.1-0.20161110003312-a9e3d0b8549d/api/constraint.go (about) 1 package api 2 3 // Constraint is used to serialize a job placement constraint. 4 type Constraint struct { 5 LTarget string 6 RTarget string 7 Operand string 8 } 9 10 // NewConstraint generates a new job placement constraint. 11 func NewConstraint(left, operand, right string) *Constraint { 12 return &Constraint{ 13 LTarget: left, 14 RTarget: right, 15 Operand: operand, 16 } 17 }