github.com/diptanu/nomad@v0.5.7-0.20170516172507-d72e86cbe3d9/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  }